Subaru- when it rains, it locks

I have a 2001 Subaru Forester. When it rains or goes through the car wash, the locks start cycling and it becomes impossible to open the car by any means other than the key in the door. My concern is that if the car is in an accident (in the rain) that the occupants will not be able to get out.

I have seen that others have experienced the same “crazy locks” on these Subarus.

How do we cure this?

Looks like the door switches need replacement. Check here for info