CO2 in the air is damaging all life on earth, while a lithium mine at most damages the local area around the mine. It's probably much better to have a few local "dead" spots than a complete planet out of whack.
And as a sibling comment said, lithium can be recycled.
CO2, whether from fossil fuel combustion or respiration (e.g. part of your and my exhaled breath, day and night) becomes plant tissue. Land plants, algae in the oceans, the herbivorous content of your salad, the flowers in your garden, etc.
Yeah, well, I expressed myself clumsy. CO2 in itself is not bad, but the global warming effect caused by too much and unnatural CO2 in the atmosphere is bad. And that global warming effect slowly wreaks havoc with natures balance and long-term kills life on earth as we know it.
And as a sibling comment said, lithium can be recycled.