Hey-
The viewport itself needs to have focus if you are trying to get it to fullscreen. What I mean by this is that the Content Browser / World Outliner / etc, can all have focus based on where you clicked last. Click anywhere inside the viewport and then press F11 to fullscreen. Additionally, you can check Editor Preferences → General → Keyboard Shortcuts to check which key controls this behavior. F11 is the default shortcut for “Immersive Mode” which I believe is the setting you’re looking for.
Cheers