Hiding the old menu after the new menu is shown isn't possible on Wayland:
qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x17dd550) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x120d9f0) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents