Optimal climate policy as if the transition matters