Reproduction steps:
1. Open the attached “IN-108896.zip” project
2. Open the “Scene default” Scene
3. From the Hierarchy, click on the "## CLICK ME ##" GameObject
4. Click “Reload scripts” in the Inspector
5. Observe the Console logs
Expected result: SceneUtility.GetBuildIndexByScenePath() should return valid build indices for scenes in the active Build Profile, with "Scene override.unity" returning index 1
Actual result: SceneUtility.GetBuildIndexByScenePath() returns -1 for "Scene override.unity" because it only checks global Build Settings, ignoring the active Build Profile
Reproducible with: 2023.1.0b1, 6000.0.54f1, 6000.1.12f1, 6000.2.0b10, 6000.3.0a3
Reproducible on: Windows 10 (user reported), Windows 11
Not reproducible on: No other environment tested