The initial cost in CO2 is absolutely part of the measurement, but if you want to look at finer metrics then you can look at the ratio of estimated CO2 costs over the life of the source over the energy produced too, which gives you good hints as to what requires a lot of emissions to get a lot of energy (which is really what we're trying to curb in the first place). From that metric for example, photovoltaic energy is orders of magnitude worse than nuclear and wind (wind without storage: a dozen grams per KWh, nuclear: a dozen grams per KWh, photovoltaic: between 100g and 200g of CO2 emission per KWh, and beyond if you were to count the batteries). The ROI on the other hand definitely got much better for photovoltaic over the years, and AGAIN AGAIN AGAIN this is why I have not been saying once in all those messages that renewables should be dropped and all the research on it dumped. We CAN make things better, and we WILL benefit from having such extra sources - especially as we learn to extract more and more energy from the same sources.
I'll refer to my response to your other message for multiple sources of why that is not enough.