Obviously. But I doubt app authors will bother registering menus with a global API if the global menu is not a platform standard every user expects them to follow (which is how it is in the Mac world).
This was also illustrated by Ubuntu by the way. When Ubuntu had the global menu ootb most of the Linux GUI apps supported it. A significant portion of the same apps don't seem to support it in other distros/DEs even if I configure them (the DEs) to use the global menu. I tried Xubuntu, Manjaro KDE and ended up using classic in-window menu set-up because many apps used it anyway and I want the thing to be uniform (the situation when some apps use the global menu when many use their own seems ugly to me).
Because everybody can draw their own menu in their window. Like Sublime and VSCode do.
Nevertheless, if you require that, why not make the place where the menu is displayed configurable? KDE does - it offers 3 options: the global Mac-style menu (which you can put anywhere, even in the middle of the screen if you want), classic Windows-style menus or "hamburger" menu buttons (utterly inconvenient but I'm still glad there is an option for those who like it).