I have the same problem on the same phone. I am talking with the airmusic developer and they said there is a bug in Graphene OS that is causing this that has been reported but I was unable to locate a bug in the issue tracker. Upstream also had an issue where when the screen is locked the audio cuts out. That fix is working its way to devicss slowly now but still hasn't landed on the pixel 8 pro. I'm hoping once it lands in upstream and is brought into Graphene it fixes the problem as well but if it doesn't and I can't find another bug I'll likely open one.
Here is the upstream bug: https://issuetracker.google.com/issues/369904692