I doubt photons are massless. They have ‘negligible’ mass. That is not zero mass.
Black hole gravity pulls in anything that has mass. If photons were massless they would not get sucked into black holes.
They don’t get sucked into Black Holes. They just can’t leave them....................