Default No sound?

My phone is stock. When I turn on the phone, I get the first few minutes with all sounds and playback, but after a few minutes, all sounds turn off as if the phone is on mute. No sound on speaker nor the headphones. I do get all the sounds if I connect to my bluetooth speaker though. Does anyone have or had the same problem and know if there is a fix? Thanks in advance.