" But in 25 years we will have much better panels and they will be way cheaper, probably everything will be replaced."
It is not even remotely acceptable to spend trillions of dollars to have to do it again in a couple decades and those aren't minimums they are manufacturer warranties based on when the panel output will reduce to below acceptable levels. Additionally most solar installations are not sized for a double requirement in addition to accounting for average sunshine so they will fail to provide even enough power for the home well before that 25yr mark.
Yes yes, battery technologies exist that last longer... with servicing which itself carries an impact and without decent energy density. The battery problem is perpetually 10-20yrs away from being solved. The ecological impact of gathering enough raw materials to cover the roofs around the globe with these panels and supply all the batteries is massive and PERMANENT and doing it over and over again is hardly a valid solution over the long haul. I doubt we'll make it even a century on that path. Trusting that people in the future will magically pull better answers out of the air is how we found ourselves in this boat.
Fusion is a possible solution for one side of this problem. But not today. Today the answer is nuclear and the waste everyone loves to mention has many uses, including providing power. As I said Hydrogen for the batteries. As a bonus the clean production of hydrogen is also the production of its waste product, clean water.
People hate hydrogen because oil companies hope to retrofit the existing gasoline infrastructure and utilize it so it benefits oil billionaires. Solar and wind get pushed so heavily because a different set of evil billionaires in California and China are robbing us blind in the process.