How big a panel? How big a battery? How many hours of sunshine? How many hours of charging?
You're too imaginative. Imagination will take you on an endless path to failure, far more often than success.
In practical terms, in most of the world, for most of the cars, on most of the trips, it doesn't work.
Sure, in a desert, on a hill, at the equator, for one car, with a week of sunshine and a day of charging. But that's not where we are. On a mountain, at the arctic circle, in the rain, with an hour of sunshine, and an hour of charging, not a chance.
It needs to be worth getting from here to there. I'm telling you that your there, imaginative as it may be, is not worth the expense of the transition.