The concept of a car with solar panels on top doesn't pass the back of the envelop calculation sanity check. Even with panels capturing all the energy they receive from the sun and a car parked in a location with perfect exposure, the energy captured in a day is barely enough to make it move a few kilometers.
Relying on the (clean) grid for charging is actually the better approach.