I've been lurking here for a couple days now with similar volume going down to silent problems. I have a Moto G7, and this problem occurs while listening to my Pandora app via headphones through the phone jack . Initially it happened after about 10 minutes of listening, the volume goes down to silent. I thought it was a Pandora issue and their trouble-shooting guide suggested A) clear the saved data B) turn off any phone battery power saver apps. A) didn't help, B) helped my phone last longer, about 20 minutes before the problem recurs.
I tried a few of the suggestions on this thread without success and was considering one the volume control apps. But while looking through my phone apps in my phone's Settings app, I found Settings>Apps & notifications>see all apps>Digital Wellbeing. This came from the Google Playstore and TBH I have no idea how it got on my phone or if/when I gave permission. It has no widget, but has various controls for screen time, DND, app timers among many others. I disabled it and was able to listen to Pandora for 45+ minutes without issue. My next thought was to uninstall it, but in the "more" section of the App info, my only choice was to Unistall updates. Clicking on that opened a window with "Replace this app with the factory version?" It seems to me this App came pre-installed on the phone and was updated to the current configuration.
I plan to monitor this on my phone over the next several days, but I am hopeful that the pre-installed app Digital Wellbeing is the cause of the problem and disabling it is the cure.