It not only avoids the battery problem, but can be a solution to the battery problem.
https://en.wikipedia.org/wiki/Pumped-storage_hydroelectricit...
However, nobody told the sun that, so it keeps heating up the seas, evaporating their water, and letting the resulting moisture drift until it gets pushed up into cold air by some land obstruction like a mountain range...
"Pumping" the water uphill in this manner is very inefficient, but like all legacy technologies, we're stuck with it until we can invent a replacement ;-)