Reproduction steps:
1. Open the attached “Repro“ project
2. Build the project on the Dedicated Server platform (File > Build Settings > Dedicated Server > Build)
3. Delete the “~/Library/Application Support/UnitySupport“ folder
4. Run the build from the terminal
5. Observe the output
Expected result: "Application.persistentDataPath = ~/Library/Application Support/UnitySupport/BugPersistentDataPath"
Actual result: "Application.persistentDataPath = ~/Library/Application Support"
Reproducible with: 2021.3.41f1, 2022.3.40f1, 6000.0.13f1
Reproducible on: M1 Max MacOS 14.5
Not reproducible on: No other environment tested