It is my understanding that when they race those solar cars in Australia, that is exactly what they do. The batteries must be charged by the sun for some time prior to the race.
I think that is really a non-issue. If they have the ability to fully charge the batteries from sitting in sunlight, then what difference does it make if they do it that way versus charging them up the other way?
The difference to me is when they say they “took off without fuel.” Suppose there were a machine that used sunlight to turn air into aviation fuel, say, by using the carbon from carbon dioxide in the air, and hydrogen from the water vapor in air. If that machine were on board, and churning out gas as the plane was prepped for the flight, I don’t think one could claim that the plane “took off without fuel”, even if the tanks were empty earlier. So it is with batteries and electric motors: batteries simply store the chemical energy in a different way, e.g. as lithium metal or lead dioxide, instead of gasoline, and you get the energy out as electricity instead of as combustion. Maybe what they mean is “without any combustible fuel” but I think that is misleading and therefore deceptive.