How to reproduce:
- Create new project
- Open Animation window
- Select any object in Hierarchy
- In Animation window create controller
- In Project view create new script to force domain reload
- Observe Animation window
Expected result: The selected object is still shown in Animation window
Actual result: "No animatable object selected"
Tested with: 2021.3, 2022.2, 2023.1, 2023.2 MacOS 12.3.1