Suppose you have a spacecraft in a circular orbit around a planet. It now does a prograde burn to accelerate. As anyone who’s ever played Kerbal can attest, that will raise the craft into a higher orbit; more specifically, it will raise it into an elliptical orbit with periapsis at the point of the burn and apoapsis directly opposite that.
Suppose that in a later revolution, the spacecraft does a retrograde burn at the same point, to descend back into the original orbit. Where did the energy go that was consumed by the two burns? It can’t be conserved in the form of potential energy, since the spacecraft is now in the same position as before the two burns. It can’t be in the form of heating up the surrounding atmosphere via friction, since we’re outside the atmosphere. Yet I would suppose that the law of conservation of energy means that something must have changed to a higher energetic status, and that’s where the equivalent of the consumed fuel now is.
Yes, in the rocket exhaust. The exhaust from the first burn ends up in a lower orbit, conserving the energy of that burn. The exhaust from the second burn will be in a higher orbit, conserving that energy.
You don’t even have to be in orbit to have the same problem. Suppose you are in nearly empty space. You fire your rocket to accelerate, then flip and decelerate. You’re now back at the same speed you started at. Where did the energy go? It’s mostly in the exhaust, flying away at high speed (some was radiated away from the ship itself). Also note that since the ship’s momentum is zero, so is the propellant–the momentum of the particles flying in each direction also sum to zero.
You always have to keep track of the propellant’s energy, wherever it may be. One curious fact: under some conditions, the upper stage of a rocket can increase the energy of its payload more than the chemical energy in its propellant. How can that be? It’s because the previous stages added kinetic energy to the propellant, and you have to count that too.
Actually there’s a simple way of looking at it, which is that a rocket stage has a fixed amount of delta V, regardless of how fast it was going to start with. But that delta V can add an arbitrarily high amount of energy if you increase the initial velocity. That energy comes from the kinetic energy of the propellant at staging time.
Don’t forget that the propellant also contains stored chemical energy before you burn it, which also needs to be taken into account in the energy balance.