Solar panel charging battery loss over night from leakage current
Solar cells are diodes.  They produce voltage when illuminated such that the current is flowing backwards thru the diode.  This means when dark, a cell just looks like a forward biased diode to any voltage applied with the same polarity as the diode produces when illuminated.

This is also why there is usually a Shottky diode in opposite polarity across each series cell of a solar panel.  When dark, a cell will act like a diode, which will block the light-caused current of a panel.  A single dark cell in a series string is enough to kill all the current.  If enough cells are in series, the remaining cells can cause enough voltage to exceed the breakdown of the dark cell and cause damage.  The Schottky diode across it also prevents this from happening.

Solar panels therefore must have a diode in series with them if directly connected to charge a battery.  This is just normal operation of a solar panel, and any real installation will include this diode.

For low voltages like a 12 V battery, the diode can be Schottky, which has a lower forward drop and therefore wastes less power when the battery is being charged.  Schottky diodes have higher reverse leakage current the full junction diodes, but that will still be small compared to the self-discharge current of a typical "car" lead-acid battery.