Update: I exited full-screen mode and re-entered full screen mode and now Firefox does behave as desired. See description below.
This might be specific to newer models of Macbook (2021 and later, with a selfie-camera bezel that 'eats' into the screen) ...or any version. I am not sure.
In my currently used macOS version 14.0 (Sonoma), when you put an application to full screen mode, the mac will respond to your cursor moving to the top of the screen by sliding down the hidden top bar of macOS. This also goes for the Firefox browser (running version 119 currently). This means that whenever I reach for a tab and overreach a bit too much toward the top, macOS is quick to respond by pushing the full screen app a bit downward and giving the OS's top bar its visibility. This means that tabs quickly become unresponsive, mainly the close-buttons (X). It has become a tedious effort to simply shut down a tab, since macOS's response to the cursor position quickly (within tenths of a second) overrules and overlays the Firefox browser.
I am guessing this has to do with Firefox filling up the full-screen area vertically too much, in contrast to competitors Chrome and Brave. These take up vertical screen space up towards the camera bezel and only when the cursor moves fully above the tabs and active screen area of these application, macOS starts responding by showing the top bar. This allows the user to access, move and close tabs much more easily without rapid interference by macOS. Firefox is not optimized for this specific feature/bug of macOS and suffers from it. Please update the application to stop this behavior - probably by copying the vertical space layout/design of competitors Chrome, Brave and Safari.