In any heat machine, the efficiency is determined by delta temperature and delta pressure. The higher temperature and pressure that can be achieved in the working fluid when heat is added, the higher the efficiency. In air breathing engines, the pressure is limited by the capability of the fan and compressor. With a rotating detonation combustor, the supersonic detonation wave raises the pressure and temperature significantly higher than than the inlet pressure while shielding the compressor from that elevated pressure, greatly increasing the efficiency of the thermal cycle.
For a liquid fueled rocket engine, the fuel and oxidizer pumps have to deliver their liquids to the combustion chamber at higher pressures than the chamber pressure. Pressurizing liquid flow is much easier than than compressing air, but it is still a challenge. Rotating detonation combustion can once again raise the combustion pressure higher than the pump pressure, but it would not seem to be as much of an ISP advantage as for an air breathing engine.