Some deflation is natural similar to a soufflé but if the eggs deflated immediately, it's most likely due to overcooking and overheating. Lower the heat and steam for less amount of time next time. When cooking the eggs, allow large curds to form to give structure and support for the eggs when they steam.