It is catching up, but slowly with still quite a ways to go (at least from 2022 data) . . . the probem is population and demand can grow exponentially too - or if not they can have s-curves with short term exponential growth. Especially for, say, a developing economy that is growing car ownership/usage, or is transitioning from high infant mortality to low and fertility hasn’t dropped as it seems to after economic growth.
End result - fossil fuel use has also grown, a lot, over the last 30 years. Even despite the ramp up of renewables. Both in total energy source, and as a source of electricity.
What seems to work best from this data is decent sized economic recession like 2008 (a bit) and a pandemic (a bit more) - just need them to last a bit longer. /s /not-s
The other thing that is quite helpful is stuff like clean air regulation (for example LCPD and IED) - here is the UK electricity source graph as an example of coal switch off following that type of regulation.
But even there with direct regulation to shut the large coal plants (over about 30 year period), it has been gas that takes up the slack. But this is 100% politically driven regulation; nothing to do with the price of solar, or even windmills. It took the 70s recessions , smog choked cities, and a callous devil-posessed prime minister who literally set an army of violent thugs (with badges) on the coal miners to set up the conditions for that - otherwise we might still be stuck with coal a bit like Australia seems to struggle with. It helps that we can’t do open cast mining here though so coal was economically redundant anyway.