Reproduction steps:
1. Open the attached “IN-94166” project
2. Open the Build Profiles window and select the “Test” profile
3. Switch to the “Test” profile
4. Build and run using the project using the “Test” profile
5. Open the developer console in the browser
6. Observe the developer console window
Expected result: No errors appear in the developer console window
Actual result: 1 error appears in the developer console window
Reproducible with: 6000.0.37f1, 6000.1.0b5, 6000.2.0a2
Could not test with: 2021.3.48f1, 2022.3.57f1(Custom Build Profiles do not exist)
Reproducible on: Windows 11, Windows 10(User)
Not reproducible on: No other environments tested