The energy delivered by the battery in flight, is what you need to use to restore it back to fresh. The more energy you need the better your battery.
Why does it need to be specifically solar? Use electric from the grid, and as the entire grid changes over to other power sources so will this.
The vast majority of grid electricity is still produced from fossil fuels (at least where I live).
Additionally, a “wasteful” process, like electrolysis of water to make hydrogen, can be usefully inserted at onsite wind generation sites for when the grid isn’t requiring/buying vs sitting idle. When you see large wind turbines stopped and you know that there is a constant stream of wind at 50m above that ridge line it’s simply because the grid is not buying atm. I’m positing that aluminum air batteries are viable for aviation for the same reason.