Even if the OS “renders” the menu or “owns the pixels”, it’s still being driven by procedural code within the app in order to create those menus. This is not some declarative spec that apps just hand off and wipe their hands of. The app “owns” the menu bar, it just uses OS libraries to help with it.
If the app code misbehaves or doesn’t follow the API contract, it’s completely possible to have bugs with the menus. For example, if an app just deadlocks, the menu bar hangs with a spinning beach ball the same as any other GUI element drawn inside a window. Switching to another app will cause the menu bar to work (because that other app is now rendering the menu bar), but it will remain frozen if you switch back to the frozen app.