Pointing to the CO2 emissions during production of an EV is bullshit, and here is why: production is also only as clean as the grid.
Producing things requires energy, and producing batteries takes more energy than producing an ICE, but if the energy to produce them comes from clean sources, both are clean in terms of CO2. There are other impacts, including the impacts of mining (which produces CO2 if the mining equipment burns fuel), and potentially water and air contamination from the production facility, but a an EV plant powered by solar is cleaner than a ICE plant powered by coal.
And even with the current grid, EVs are better. If you have one of the dirtiest grids in the country, it is slightly better to have a hybrid with a small battery, or a highly efficient diesel, but only if you assume that the gird won't get cleaner over the life of the car. But if you have a clean grid, or even the national average, the best car for the environment is a BEV. A Leaf may be better than a Tesla because of battery size and other factors, but the Tesla is better than a dinosaur burner. To top that off, I'm not sure if the analysis I was looking at took into account the energy cost of refining gas.