My guess is the door or window seals are bad letting water get to one of the hatch switches on the edge of one of the door panels. To check it go to a do it yourself car wash and select the spot free rinse water and hose down those areas. It is deionized water and best approximates rain water. Tap water often doesn’t give the same result because of the minerals in it making it “stickier”, not allowing it to get into places where rain water can. A trick from my old “Benz” days.
H