When this occurs.......try disconnecting the headlight switch.
Let me know what the results are.
The trailer tow connector can have water in it.
I try disconnecting the brake light switch and see if it helps,if it is shorted internal.
connector c100,c106 need to be check also for water intrusion.