How to reproduce:
1. Open the attached project "Pirate14.zip"
2. Select "Camera" and "GameObject" in the Hierarchy window
3. Right mouse click on the "GameObject"
Expected results: Both "Camera" and "GameObject" are selected
Actual results: Only "GameObject" is selected
Reproducible with: 2023.2.5f1, 2023.2.7f1
Not reproducible with: 2021.3.34f1, 2022.3.18f1, 2023.2.4f1, 2023.3.0b4
Reproducible on: Windows 11 22H2
Not reproducible on: No other environment tested