A disappearing menu bar in full screen mode is a known issue that has been reported by users of 3rd party Menu Bar utilities (Bartender, BetterTouchTool, etc.).
How to fix it:
Ensure your settings show the Menu Bar at all times (confirming you've done this)
- Open System Settings
- Click on Menu Bar
- Set the option to Automatically hide and show the menu bar to Never

Disable or Update Third-Party Menu Bar Apps:
- If you use apps like Bartender or Ice, update them to a Golden Gate-compatible version.
- Try quitting your menu bar utility apps entirely to see if the random disappearing stops.
- Since these apps install system extensions, you may need to completely uninstall the app and all components to fix the issue.
If the above do not work, then see if the problem is present when you boot in safe mode. That process performs some system cleanup and clears caches, and also disables 3rd party extensions that may cause problems.
Start up your Mac in safe mode - Apple Support
If that does not correct the issue, test in a new user account. A newly-created user account will have all settings at default, and if the issue does not occur in that new account then it provides guidance on what may need to be changed to correct the issue.
Add a user or group on Mac - Apple Support
Once the testing is complete, the new account can easily be deleted.
It might help to download and run EtreCheck, written by a long-time forum member. The free version is fine. Post the full report using the Additional Text button. No personal information is revealed.

Personally, I cannot replicate this issue on my 16" M4 Pro MBP running 27.2. I have Automatically hide and show the menu bar set to Never, and my Menu Bar is always present, on the internal display, on an external display in extended or clamshell mode, when I mirror or extend my screen to my iPad via Sidecar, on full screen apps, etc. The Menu Bar obeys the setting to not hide itself. For example, when I make a Safari window full screen (this was from a similar thread this morning).

I will also say that another user reported seeing a similar issue in safe mode, suggesting it's a settings-specific bug in macOS. Bugs can be reported to Apple here:
Feedback - macOS - Apple