Yep, in an ideal world solar makes it not so bad and we're transitioning there. But my country (the Netherlands) is still about 50% powered by dirty sources and the energy transition is happening too slowly to avert the climate crisis, so let's not wave it away with solar promises.
That's also only the operation of the things, their production and transport involves global chains of mining, shipping etc. and all the solar panels would be the same on top of that