A properly installed SPG with water inside is rare and may just mean the SPG was defective, particularly if it is new. If an SPG that has been working is still working when flooded then most likely something broke the seal on the face, usually an impact. Impact damage is an unavoidable fact, it's not serious, just replace the SPG. It's more of a concern to discover a non-working flooded SPG on a cylinder other than the primary. If the SPG is not working then the Bourdon tube might have ruptured, and that is often because water entered the tube through a flooded first stage. Diving with stage, deco and bailout cylinders turned off is a common practice to prevent gas loss, but the regulator must be charged with pressure before descending or it will flood. If the first stage floods, it should be serviced immediately.
Sometimes divers forget to charge, but in our experience the gas pressure was inadvertently drained before reaching depth. The second stage might inadvertently be purged while gearing up. Sometimes it purges from the force of entry and free flows until drained or just dribbles out during the descent, which was one of the original reasons for leaving the valve off. If practical, make a habit of charging the regulator again during descent. An alternative on emergency bottles is to leave the valve open, but place an inline slide cutoff between the hose and the second stage and put an OPV on the first stage.