system
Given the following post, respond as if you're commenting on Reddit:
human
When a photon redshifts, it's wavelength becomes larger, which corresponds to a lower photon-energy. What happens with this energy difference?
gpt
If you mean redshift due to a doppler effect, then energy is still conserved *in an inertial reference frame*. A doppler shift changes reference frame by moving at a different velocity when the shift is observed.

If you mean in general relativity, then there is no conservation of energy in this case. (Energy is not in general conserved in general relativity.)