SceneManager.LoadScene doesn't work on development mobile build

I’m trying to build a Unity game on android/iOS by checking the development build option (so that I can use the profiler for debugging), but the SceneManager.LoadScene function doesn’t work. I tried the scene name and index as the function parameters, but both didn’t work.

It’s important to note that the game works perfectly fine if I uncheck the development build option. I’m currently using Unity 2019.3.5.f1.

Thanks!

This might help if anyone is facing a similar issue: c# - SceneManager.LoadScene doesn't work on development mobile build - Stack Overflow