How to reproduce:
1. Open the attached project "IN-78944.zip"
2. Open Assets/Scenes/SampleScene.unity
3. Enter Play Mode
4. Click the "Select all" button in the Game view window
Expected results: Selection is almost instant
Actual results: Selection takes more than 20 seconds
Reproducible with: 2022.3.35f1, 6000.0.9f1
Could not test with: 2021.3.40f1 (compilation errors in the Console window)
Reproducible on: Windows 10 22H2
Not reproducible on: No other environment tested