So no more cheese coming out
Use cheddar and mozzarella cheese
Try to cube in stead of grating it. If possible...
Squeeze all the water out from the onion and corn
Add 2/3 tablespoons of flour to your grated cheese and onion as well as a pkt or two crushed Lays chips , use Spring Cheese and Cheese n Onion Simba - small pkts
Pulse the corn because if you leave it whole then it's the same concept as making popcorn. They whole corn kernels pop in the samosa and cause it to burst.
Also found with moons, spring rolls and especially cheese and corn samosas, take them out in the morning and spread on a tray/dinner plate lined with paper towel. Keep in the fridge to defrost.
Fry them cold, not frozen in hot oil.