No, it does correctly capture that. The relativistic mass of a photon is not zero even though its rest mass is. However for a zero-mass particle you cannot use the Lorentz transformation to calculate relativistic mass, because v = c and so you would be dividing zero by zero.
You can correctly calculate the relativistic mass of a photon in other ways, such as from its momentum or its gravitational interaction, and doing so gives you the energy you'd expect from E = mc².
Oh heavens whatever caused you to believe this? The momentum p of a photon is given by p=h/λ where h is the Plank Constant and λ is the wavelength. Compton won a Nobel prize for this.
Of course p = h/λ. Thus the relativistic mass m is given by p/v = p/c = h/cλ. And a photon's energy is given by E = hc/λ. This is all in agreement with the relativistic mass you'd calculate from the photon energy E = mc².
Except that it does gravitate more. Avoiding the confusion that it doesn't is one of the conceptual benefits of relativistic mass. Gravitation is dependent on the stress-energy tensor, which contains... drum roll... relativistic mass, not rest mass!
For that matter, you've already noticed that the Lorentz transform becomes nonsensical as v → c when starting from rest mass, whereas the transform works just fine when using relativistic mass as the starting point, and nothing blows up, and you can avoid any confusion.
You can correctly calculate the relativistic mass of a photon in other ways, such as from its momentum or its gravitational interaction, and doing so gives you the energy you'd expect from E = mc².