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.
I have been in some heavy rain, the local news said three inches per hour and it was believable to me. Never done anything but a good clean up of the bike when I got home. The only problem I have ever had was when I had so much rain on my clear riding glasses (left my face shield at home)I couldn't see water running across the road in a low spot. Blew water over my knees and shot the fog light fuse.
I am with RiverRat and the garden blower.Have used it on average once a fortnight for last six years on both the 2005 gl1800a and BMW r1200r.Not fazed about washing bike but MUST be rain water and the blown off straight after and NEVER wiped dry.Started up after just to cook water out of exhaust and motor.Never had a single problem and bikes are impeccable.As for others with compressed air,that may be a tad too powerfull??????
It is no worst on the bike than washing it....To make you feel better push it out into the sun and let sit..Things will be dry in no time...I always do this after I wash it and never had any problems with any buttons on any of my bikes..