Leakage protection for solar panels