This may be caused by missing body seam sealer under the battery tray or at the crossmember under the windshield.
Missing seam sealer can result in water intrusion on electrical connections. If missing, apply seam sealer P/N A 003 989 98 20.
Examples of missing sealer.
Example of applied seam sealer.