I'm not an absolutist about crude oil. It'll likely have a place in society for a long time.
With that said, it's a matter of degree and where it should be deployed.
If, for example, burning 1 gallon of gas sets up a power generation which produces the equivalent of 20 gallons of gas without emissions, that's a worthy trade off.
As it turns out, that's roughly the energy trade-off for new solar/wind installations assuming a pure fossil fuel grid.
What you are saying isn't a gotcha. The entire cycle of CO2 released for fossil fuel use is not comparable to the CO2 released installing renewables. That some is released is meaningless.