But that definition doesn't take into account availability. This wasn't a problem when all electricity sources were highly available by default. You can burn coal or run the hydro turbines any minute of the year. With the rise of often-unavailable renewable sources like solar and wind that definition is now insufficient and under counts the true like-for-like cost of solar.
By any metric which takes into account minor availability requirements (eg. supplies electricity at night) solar badly loses its cost advantage. It gets even worse if the metric is the still important "deepest winter night" scenario.