As the entry point for the switch is at the back of the engine it's pretty unaffected by rain, no matter how hard.
The cover for the wires, however, ends before the wires get routed around the frame, and is perfectly positioned to fill up with water every time you wash the bike..... Pull hte rubber grommet off the switch, let it dry out well and fill the lot with grease. Should sort it.
Ali