How to reproduce:
1. Open the attached "IN-137740_StackTraceIssue.zip" project
2. Go to Edit -> Project Settings -> Player, and make sure that:
- Scripting Backend is set to IL2CPP
- IL2CPP Code Generation is set to Optimize for runtime speed
- C++ Compiler Configuration is set to Debug
- IL2CPP Stacktrace Information is set to Method Name, File Name, and Line Number
- Managed Stripping Level is set to Minimal
3. Build the project
4. Run the built application
5. Return to the Editor window
6. Press the three dots in the right corner of the Console tab
7. Press "Open Player Log"
8. Observe the Player log
Actual result: The line "Test.GameplaySystem:get_ActiveGameplayState() (at E:/Projects/StackTraceIssue/Assets/Scripts/GameplaySystem.cs:11)" is present
Expected result: The mentioned line is not present
Reproducible with: 2023.2.0a1, 6000.0.72f1, 6000.3.12f1, 6000.4.1f1, 6000.5.0b1, 6000.6.0a1
Could not test with: 2023.1.0a1 (Build failed with errors)
Reproducible on: Windows 10 (By user), Windows 11
Not reproducible on: No other environments tested