Reproduction steps:
1. Open the attached “BugRepro” project
2. Click BugReport > Works
3. Observe the correctly drawn EditorWindowTest window
4. Close the EditorWindowTest window
5. Click BugReport > “Doesn’t work”
6. Observe the empty EditorWindowTest window
Expected result: EditorWindow is drawn correctly
Actual result: EditorWindow flickers and becomes empty
Reproducible with: 2021.3.15f1, 2021.3.17f1
Not reproducible with: 2020.3.44f1, 2021.3.14f1, 2022.2.4f1, 2023.1.0b1
Reproducible on: Ubuntu 20.04
Not reproducible on: Windows 10 Pro 22H2, Intel MacOS 13.1