I’m extremely disappointed Ubuntu gave up on Unity. It had the same basic concept, and menus being searchable was so good. GNOME’s determined direction (Adwaita) is so dumb for anything but small, simple apps. Just hopelessly bad.
Mind you, app-defined command palettes can be better than a global one because they can provide more information and context and augment it with other widgets as appropriate. The best command palettes are not just a searchable version of the menu, they add more.
I think probably app-defined palettes and a global menu is best possible combo.
The app-defined palette enables more rich functionality as you’ve mentioned, while the system-owned global menu provides a consistent way to see everything an app is capable of without hunting and pecking through the palette. The menu also serves as a unified API for assistive and automation technology to interact with software and allows users to choose how the menus are displayed (don’t like a top-aligned menubar? Cool, your desktop can present it as window attached menus, a pie menu, or NeXT style floating menus or anything else you can imagine).