Indeed. Does your country import fossil fuels? Then you're at the mercy of global energy prices. Whereas renewables lock in the purchase of energy over 20+ years with a big upfront payment.
Ironically the rise in interest rates may be the worst factor affecting the transition.