A photon that escapes from black hole's neighborhood does work on the black hole. The photon causes the black hole not to be in the photon's gravity well after the photon has escaped. In other words the photon increases the potential energy of the black hole.
The following paragraph may not be science, I just want to say something sane, as opposed to "photon that tries to escape loses energy":
A photon that tries to escape, tries to do all the things that a photon that escapes does: it tries to escape, it tries to redshift, it tries to do work on the black hole, it does not do those things, it tries to.
What does a upwards directed photon exactly at the event horizon do? Well, it stays at the event horizon, so no change of potential energy of photon happens, and no redshift of photon happens.