Take some dielectric grease and mash it into where the wires go into the sidestand switch. get it in there good.
I had a similar problem two years ago going up to the GA Rally. Had grease everywhere else but there. Did that fix and I have run in torrential downpours since then with nary a problem.
It's a quick fix too....