[NOTE]: The original bug description below mentions using Linux for building the project, but some of the later comments mention that this also happens when building the project on Windows using the same command line flags (batchmode and nographics).
Reproduction steps:
1. Open the attached "BugRepro" project normally, make sure there are no errors in the console
2. Close the Unity Editor
3. Build the attached “BugRepro” project with this command line: /path/to/unity-executable -projectPath /path/to/project/ -quit -batchmode -nographics -executeMethod BuildCommand.PerformBuild
4. Transfer “/Builds/FromBatchmode“ build to a Windows computer
5. Launch the Build
Expected result: A Cube GameObject is visible
Actual result: A Cube GameObject is not visible
Reproducible with: 2021.3.30f1, 2022.3.8f1, 2023.1.11f1, 2023.2.0a4, 2023.2.0b7, 2023.3.0a3
Not reproducible with: 2023.2.0a1, 2023.2.0a3
Reproducible on: Ubuntu 23.04, Windows
Not reproducible on: No other environment tested on
Notes:
- Not reproduced when using forward rendering
- Not reproduced when building from the editor
- Not reproduced when removing the -nographics argument
- Not reproduced when building for the Linux Player