I also prefer to level with the nut removed, if possible. If the nut is left in place, it’s very easy to keep banging it with the block/beam. With en end-of-fretboard style nut, the worst that can normally happen is the nut comes loose and you re-glue it. But with a slotted nut (Fender style), if unlucky, you can break off some of the fretboard on the headstock side of the nut, especially if it’s still full height so there’s more leverage if you knock the top.
If I have to do a level with the nut in situ, I’ll cover it in several layers of masking tape to provide some cushioning and a bit if mechanical support.