How to reproduce:
1. Open the attached project "PopupWindowsOpenedFromModalWindowsBug.zip"
2. Open Bug Report>Open Modal Window
3. In the Modal Window, click on the "Open Popup Window" button
4. Click outside of the Modal Window in the Editor
Expected results: Popup window closes
Actual results: Popup does not close
Reproducible with: 2020.3.37f1, 2021.3.8f1, 2022.1.12f1, 2022.2.0b3, 2023.1.0a5
Reproducible on: Windows 10