Reproduction steps:
1. Open the attached “BugRepro” project
2. Click File > Build Settings
3. Select the Dedicated Server platform
4. Build
5. Run the build from the terminal
Expected result: The player catches the exception
Actual result: The player crashes
Reproducible with: 2021.3.27f1, 2022.3.1f1, 2023.1.0b21, 2023.2.0a18
Reproducible on: Ubuntu 20.04, Ubuntu 23.04
Not reproducible on: Windows 10
Note: Using Mono Scripting Backend, the player catches the exception