On real phone App stopping JavaScript audio playback and HTML5 refuses to work

I have a major issue developping my app.

I am testing on AVD profiling Nexus 5 API 25 and Xiaomi Redmi Note 8T with Android 9.

I used iframe to a working external HTML with JS audio player. Meanwhile it seems to work just fine inside the AVD machine, it worked only for a few minutes in my phone. I don’t know if JavaScript stopped working on device sleep or WiFI got standby.

Now I made another app that instead uses HTML5 tag. It works fine on my Android virtual machine, but it is refusing to play on my mobile phone.

Thank you.