--- qtbase/src/plugins/platforms/cocoa/qcocoamenubar.mm.orig	2023-04-13 15:15:57.000000000 -0400
+++ qtbase/src/plugins/platforms/cocoa/qcocoamenubar.mm	2023-04-13 15:20:47.000000000 -0400
@@ -79,6 +79,7 @@
     [m_nativeMenu release];
     static_menubars.removeOne(this);
 
+#if 0 //original
     if (!m_window.isNull() && m_window->menubar() == this) {
         m_window->setMenubar(nullptr);
 
@@ -88,6 +89,17 @@
         qDeleteAll(children());
         updateMenuBarImmediately();
     }
+#else //my version
+    if (!m_window.isNull() && m_window->menubar() == this) {
+        m_window->setMenubar(nullptr);
+    }
+
+    // Delete the children first so they do not cause
+    // the native menu items to be hidden after
+    // the menu bar was updated
+    qDeleteAll(children());
+    updateMenuBarImmediately();
+#endif
 }
 
 bool QCocoaMenuBar::needsImmediateUpdate()
