I mean if you don’t care about African mines and Chinese rivers that factories dump their effluent into, sure. But there is absolutely an environmental cost, just less to the wealthy nations that pay to move the damage elsewhere.
Global warming on the other hand threatens the whole biome and stopping the release of CO2 doesn't stop global warming once tipping points are reached. You also need global agreement to meaningfully do something about it.
(You also have to keep in mind that fuel for ICEs doesn't magically appear. Extracting oil and transporting it isn't particularly good for the local environment either.)
It's a simpler problem to tackle if you have a few thousands polluting agents than billions of polluting agents everywhere.