The nearly three-year-long war, which has left large swathes of Ukraine destroyed, has accelerated a transition to clean energy.