Minimized windows don't seem to get any events after "Close" menu item is selected from the system menu, so they were never actually destroyed when closing them in this way. Fix this by explicitly waking up the message loop after deleting the window to ensure that the delayed destruction does happen. Closes #18622. See https://github.com/wxWidgets/wxWidgets/pull/1690