Game is still running when put in background on device

I have a issue with my Android build when running on a device.
When go back to the main screen of the phone from the app it is still running in the background and you can hear the music playing.
I also had this issue on IOS but solved it by using OnApplicationFocus. This however doesn’t work on Android, I tried to use OnApplicationPause instead but with no result.

Anyone know how to solve this issue or what method I can use. All I’ve found so far is people having the opposite problem.

Edit: I’ve tested both OnApplicationFocus and OnApplicationPause and they are both being called when the application is started on Android. But when I press the android home button or return to the game they are not being called.

This seems to be a issue with builds made in Unity 2019, I upgraded to 2020 and it is now working.