In the reference frame of the atom, the photon enters and exits with the
same frequency. However, to an external observer ("us") the motion of the
atom will, in general, add a Doppler shift to the frequency of the
photon. It is the same effect that makes the sirene of an ambulance sound
the same to the guy driving the ambulance, no matter what speed he drives at,
while to a person standing at the road, the frequency of the sound is higher
when the ambulance moves toward him and lower when it moves away from him.
One may ask if it makes sense to refer to the photon as being the same before
and after the scattering event, since in fact it ceases to exist (for about
100 millionth of a second), and since, to the external observer, its energy
has changed.
However, even though it does not exist for a short while, in the reference
frame of the atom — which is just as good as any other reference frame
— the photon retains a "memory" of its energy before the event. Its state
of existence is thus not independent of its former being, and the fact that its
intrinsic properties seem to change is just a consequence of us not moving
along with the atom. Hence, from any philosophical and, in particular,
pragmatic point of view, we propose that a photon be one and the same photon,
until it is destroyed by some other physical process.