Engines are tolerant of rain. Rain infiltration is an expected design consideration so failure from rainwater is not likely. Water is channeled away, engine heat evaporates water, the filter atomizes it, and under pressure it converts to hydrogen and oxygen. In the right circumstances, it could even increase hp and decrease heat. Not a recommendation, just a hypothetical.
I had an Evo parked in a basement garage at our beach place when floods came. Found the bikes by wading chestdeep through beach balls and floating coolers until we caught the glint off my buddy's streetside mirror on his apehangers about an inch out of the water.
Rolled the bikes up to high ground and pulled the plugs. Toweled off the battery connections as best we could in the pouring rain and hit the button. Spewed a stream of mist for a few revs. Dumped some Marvel down the plug holes and tarped them. Waited for two days until the roads were open to take my bike to the dealer. It was only a month old after all.
Fluid changes, a couple of handlebar switches and I was good to go three days later.
When I picked up the bike the wrench said that it was 99% dry. I pushed the button and it fired right up. I threw a leg over it and when I sat down I found out what the wet 1% was.
Still own that bike 16 years later and have never been in the motor or had electrical problem one (that I didn't bring on myself).
Cross Country Tour.
Where I lead me I will travel
Where I need me I will call me
I'm no fool I'll be ready
God knows I will be
And in the meantime make a little money
And buy a little mercy
That was written by Townes Van Zandt