How to reproduce:
1. Open the attached “IN-149046“ project
2. Switch the Inspector to Debug Mode
3. In the Project tab, select Assets > Repro > A_Auto3000
4. Confirm that the Custom Render Queue value is 3000
5. Run Test > Build from the menu
6. Confirm that the Custom Render Queue value of A_Auto3000 is still 3000
7. Close the Unity Editor
8. Delete the project's Library folder
9. Build the project in batch mode (see internal notes)
10. Wait for the batch mode process to finish (around 2 minutes)
11. Open the reproduction project again and check the Custom Render Queue value of A_Auto3000
Actual result: The Custom Render Queue value has been changed to 2000 (Geometry) on disk (m_CustomRenderQueue in A_Auto3000.mat). Because a non-negative m_CustomRenderQueue always takes priority over the shader's own queue, the transparent material is subsequently rendered in the Geometry queue and transparency sorting breaks. The rewritten value persists and is NOT corrected when the project is later opened interactively.
Expected result: The Custom Render Queue value remains 3000
Reproducible with: 6000.0.10f1, 6000.0.80f1, 6000.3.20f1, 6000.5.5f1, 6000.6.0b5, 6000.7.0a3
Reproduced on: Windows 11
Not reproduced on: No other environment tested
Note: The issue does not occur with Interactive (GUI) Editor sessions with the same project: steps 5-6 demonstrate this - running the same build from the Test > Build menu inside the Editor does not rewrite the value, which hides the issue from users until a CI/CLI build corrupts the asset