Reproduction steps:
1. Open the "IN-47987.zip" project
2. Select the WebGL platform in the Build Settings window (File -> Build Settings)
3. Set the Code Optimization setting to "Runtime Speed"
4. Build and Run the project
Expected result: The Player does not crash
Actual result: The Player crashes
Reproducible with: 2022.2.0a16, 2022.3.6f1, 2023.1.6f1, 2023.2.0b2
Not reproducible with: 2021.3.29f1, 2022.2.0a15
Reproducible on: macOS 13.4 (M1)
Notes:
The full error is in the internal notes
The "Runtime Speed" option may also be called "Speed" in some Unity Editor versions