The water normally goes in up the wire, not in through the top. If you put some butyl bath sealant around the joint, where the wire goes in, you should be OK.
Probably, the warmth of the MOSFET inside it, heats up the air, expands it and pushes some out. When you switch off, the air cools down...