I think that's only true if that gas burning car was going to be destroyed if you didn't buy it. Someone will buy it, maybe someone that's replacing their older less efficient car. And by buying the more expensive EV, your demand is helping to increase volume and lower costs of EV's.
https://www.ucsusa.org/clean-vehicles/electric-vehicles/life...
Manufacturing a mid-sized EV with an 84-mile range results in about 15 percent more emissions than manufacturing an equivalent gasoline vehicle. For larger, longer-range EVs that travel more than 250 miles per charge, the manufacturing emissions can be as much as 68 percent higher.
These differences change as soon as the cars are driven. EVs are powered by electricity, which is generally a cleaner energy source than gasoline. Battery electric cars make up for their higher manufacturing emissions within eighteen months of driving—shorter range models can offset the extra emissions within 6 months—and continue to outperform gasoline cars until the end of their lives.
I'm not sure that's entirely accurate. You'd have to take into account the cost of sourcing raw materials for a replacement machine, right? I've heard anecdotes about how buying a used gas-burning car is actually less detrimental to the environment than buying a new EV; this strikes me as a similar situation.