Reproduction steps:
1. Create or open any project
2. Open the Build Profiles window
3. Select a standalone profile and make it active (e.g. windows)
4. Open Project Settings > Player and select another platform tab that is not the build profile one (e.g. Android)
5. Select the File > Build and Run option in the Menu (Command + B or Ctrl + B)
6. Observe which Platform the Editor is trying to build for
Expected result: The Editor tries to build for the Active Build Platform
Actual result: The Editor tries to build for the currently opened Build Platform Settings Window
Reproducible with: 2023.1.0a5, 6000.0.0b15, 6000.0.58f2, 6000.2.6f2, 6000.3.0b4, 6000.4.0a1
Reproducible environments: macOS 26.0.1
Not reproducible environments: No other environments tested