There are several reasons this can happen: 1. The dough was dry and had less moisture. Make sure the dough is well hydrated, and add enough milk.  2. Gulab jamuns were cooked at too high a temperature, making them undercooked from the inside. This can cause them to deflate as soon as they are added to the sugar syrup.  3. If the syrup is too hot, the fried gulab jamuns may shrink when added to it. The syrup should be around 100°F when the jamuns are added.  4. Sometimes, the gulab jamuns can deflate if too much leavening agent, such as baking powder or baking soda, is added to the dough.