GLOBAL COLLISION. “Photons that collide with the inner electrons of the target atoms in fact collide with the entire atom. In this extreme case, the rest mass in (Figure 2) must be changed to the rest mass of the atom.”
https://opentextbc.ca/universityphysicsv3openstax/chapter/the-compton-effect/#:~:text=The%20Compton%20effect%20is%20the,wavelength%20of%20the%20incident%20radiation