if you remember from GR the source of gravity is not just mass but the total of mass and energy as summarised by the stress energy tensor T(mu,nu).
For instance a hot brick has a little more gravitational pull than a cold brick since its total mass + energy has increased from when it was cold.
When a supernova goes bang a lot of energy goes into neutrinos which freely stream away taking energy (mass equivalent with them.) Note that only a small percentage of the star is converted to energy. 10^51 ergs is about 10^30 grams of mass equivalent. That is only about 1/2000 th of the mass of the Sun.