I've been having similar issues with my computer at home. It's not that the taskbar in Windows 11 disappears for me necessarily . . . maximized windows take up the entire vertical space of the monitor and cover the taskbar. I've kind of just been living with the issue and resize my open windows, but I'll monitor the issue more closely to see if I can spot a specific pattern.
At work we have been dealing with a few taskbar related issues in Windows 11: Incorrect time being displayed and the taskbar will go missing on second monitor. When the taskbar disappears from the second monitor, we can actually see an empty strip along the bottom of the screen revealing the desktop wallpaper when a window is maximized. I read a comment from a Reddit user saying that deploying Windows 11 23H2 fixed their taskbar issues, but that didn't work for us. Some Sysadmins on reddit seem to think an update from this month's patch Tuesday caused the issue. When they rolled back to a previous restore point...the taskbar was fine.
This has turned into quite the nuisance. Reports of taskbar issues in Windows 11 go back a couple years now and most of the posted "fixes" don't work for all. No one seems to know what the exact cause is.