Reproduction steps:
1. Open the attached project “CurveRepro“
2. Select “MyCurve“ in the Hierarchy window
3. Right-click on the curve
Expected result: Contextual menu appears
Actual result: Curve window opens and the menu appears
Reproducible with: 2023.1.0a23, 2023.1.3f1, 2023.2.0a22
Not reproducible with: 2021.3.28f1, 2022.3.4f1, 2023.1.0a22
Reproducible on: Windows 10
Note: 2023.2.0a15 and above the window closes itself shortly after opening