I do not know if this helps or not. Does not hurt anything.
But every once in awhile when I think about it. I will spray the switches and the trunk and bag weather stripping with a good silicone spray.
Generally heavy rain will not hurt the bike or the switches as it is coming mainly from the front.
Now sometimes a good bath will get water into something. Because you are spraying water from the switch side.
The only failure I have ever had in the rain was the sensor on a modulator, I have that installed looking up and one time it got water into it and the modulator would not turn off at night. But it rained hard, I mean you could not see three feet.
Normally rain will not hurt anything.