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).
I got a Cross Country Tour. It's a 2012. It's red. I done some stuff to it and will do some other stuff, but there's a bunch of stuff I don't care to do.
I know some stuff but there's a bunch of stuff I don't know. There's a mess of stuff I don't want to know but gratefully I have forgotten a lot of that.