I’m having a similar issue.
Previously had an IP12 which I used my AirPods gen 3 with daily. Never any issues.
a couple of weeks ago Upgraded to IP15 which had IOS17 installed. My previous 12 wasn’t upgraded to 17 as I knew I’d be getting an upgrade soon.
when setting up the new phone had a couple issues with Bluetooth connectivity with AirPods and watch but I just repaired and issue was fine.
issues started after a couple of days…I was streaming using Apple Music, as I’ve done for years, and randomely one AirPod dropped out and stopped playing music but my phone shows my AirPods still connected and still playing but audio only came from one AirPod. I closed the app and the AirPods worked fine again but the same thing then happened over and over. One AirPod dropped out, and sometimes the other one would also drop out again still showing as playing audio. The functions and ear detection would still work as normal. Sometimes the right would go first then the left. This has been happening daily over and over sometimes as soon as I go to use the AirPods sometimes after 30 mins on uninterrupted playback.
At first I thought it was an issue with the AirPods but they are only a year old and never had an issue with my IP12 with them. I did all sorts of repairing, resetting, trialing turning off different functions and nothing worked. But the AirPods worked fine with playback on Netflix or TikTok on the phone it was only Apple Music.
I then found the only way to get both AirPods to play Audio was to close the music app and reopen And even then I’d have issues.
I definitely think it’s and IOS17 bug within Apple Music. Weirdly my AirPods Max, Apple Watch and car Bluetooth haven’t had any issues with Apple Music just my AirPods.
did think about buying new AirPods but I fear the same thing will happen, it’s so annoying when training in the gym and I hope Apple sorts the bug out soon and gets to the bottom of it.