I had this happening too, took apart the ECM module from the engine, cleaned with an electronic cleaner and let it sit and dry for a good hour before putting it back together. I added new weather stripping along the sides of the hood to better seal from water and cleaned out any pine needles and junk hanging out along the drainage by the wipers and front windshield. Crossing my fingers that it did the trick because I haven't had that happen anymore. I did a ton of reading about it and it can also be a bad ground connection so I had already cleaned those in the engine bay and under the car.