To use Alt-Tab when a menu is open

While the context menu or the File menu is open, any attempt to press the Alt (Application Switcher) tab will be ignored and the menu will remain open. This is the case in most applications (except for some Chrome-based apps like vs-code).

Question: How can you force Alt-Tab even with the context menu open?