Solar panels & batteries are also made of toxic material. Mining & the material breakdown of these materials spead these toxins to the land they are deployed on.
Much of this material is also unethically mined. Children are coerced to mine some of this material.
I hate to be the bearer of bad news. You may be able to downvote this comment but you cannot downvote reality.
Deploying the solar panels does not spread those elements in any significant way. They are bound up in the structure of the panels. In any case it is orders of magnitude less toxins that what is produced in drilling for oil and gas and burning them. Coal is on another scale entirely producing massive amounts of toxic byproducts. Solar is just a fart in the wind in comparison.
Small amounts of cadmium and lead. Honestly you should not focus on that the batteries are the one that a legit argument is for imho. I’ve looked into why solar panels degrade over time and it’s mostly them physically being destroyed. The uv degradation happens very quickly and so isn’t gonna further ruin the panels output after its already been exposed a bit