For short-term storage a rechargeable battery is certainly preferable.
For long-term storage, the battery auto-discharges, so the efficiency drops quickly with the storage time, until it becomes much less than for storing the energy by synthesizing some appropriate chemical compound.
For storing solar energy, both short-term storage (e.g. for a day or a week), like rechargeable batteries, and long-term storage (e.g. for a year or more), like synthetic gasoline, are needed.
Lithium self discharges at 1-2% per month, not an issue in most circumstances, not sure where it would be an issue, if it was just have a maintaining solar panel nearby.
For long-term storage, the battery auto-discharges, so the efficiency drops quickly with the storage time, until it becomes much less than for storing the energy by synthesizing some appropriate chemical compound.
For storing solar energy, both short-term storage (e.g. for a day or a week), like rechargeable batteries, and long-term storage (e.g. for a year or more), like synthetic gasoline, are needed.