Oh, this is the most frustrating thing!!! I know exactly what you mean... you have this lovely mixture and then poof... it's a mess in the pan! For me, the big secret was getting the cheese DRY... I mean really, really dry! I put it in a clean cloth and twist and squeeze and squeeze until no more water comes out. It's a bit of an arm workout but it is so worth it!!!
Another thing is the sugar... sugar weeps and makes the dough wet! Try using less sugar in the batter itself, and just serve them with some nice jam or a sprinkle of powdered sugar after. And my final tip... let the mixed dough rest in the fridge for a while, maybe 30 minutes? It makes it so much firmer and easier to handle! I promise this will fix it... good luck!!!