What is "gravitational energy release"? How does that lead to light emission (I suppose heat is generated in the middle)?
That collapse reduced the gravitational potential energy of the mass of that nebula, which through accelleration, friction, and pressure, was turned into heat energy.
That heated mass will emit black-body emissions, and so the gravitational energy is now being radiated as light.
One interesting thing is that this star was detected at visual wavelengths, not infrared. While not undergoing fusion, it’s hot enough to glow blue-white.