The parent menu stopped reacting to the mouse
With embed_subwindows off on X11, after closing a submenu whose search bar had focus, the PopupMenu no longer highlighted items or reacted to clicks. Popups are override-redirect windows, so focus went back to the main window instead of the parent menu.
Focus returns to the parent popup
grab_focus() cannot help here, because the window manager ignores _NET_ACTIVE_WINDOW for override-redirect windows. window_set_transient() therefore sets the input focus back on the parent popup when the closing popup held it through the IME.