I would like this feature to save screen space, but what happens when a window isn't maximised? The menu bar items get orphaned? Or you have differing behaviour?

IIRC Ubuntu provided this when they introduced Unity -- quite a long time ago. When the window is maximized the menubar was merged into the top panel, but when the window was not maximized it looked like a regular window with tilebar and menubar at the window's top.

Not long ago there was also a KDE extension to replicate this; however, since many GNOME apps moved away from menubars, this approach isn't that helpful anymore.