The rocket equation doesn’t only apply to chemical energy propulsion - it applies to any propulsion system that conserves momentum and uses reaction mass - which nuclear drives do too.
Chemical rockets are limited in how much energy they can put into the reaction mass (by the energy density of their fuel) and therefore the maximum exhaust velocity they can achieve - which is the input into the rocket equation
But while nuclear rockets get away from the constraint of chemical energy density they still have to operate by putting energy into reaction mass and shooting it out the back to create a momentum change.
And the rocket equation still applies to the reaction mass and its exhaust velocity.
In fact in theory you can build a chemical rocket engine that burns a fuel for heat, then uses that heat to energize some other reaction mass that you eject - it’s just that that is inherently less efficient than using the spent fuel as reaction mass since otherwise you’re needlessly pumping momentum into spent fuel. Far better to throw the exhaust products away as reaction mass.