I have a Bluetooth adapter in my car that is capable of playing through the charger cable also but I just use the Bluetooth mode as I haven't ever gotten the playing through the cable to work. The issue is that when I plug my phone in to charge it switches from Bluetooth mode to cable mode, which isn't functional.
The fix that I have attempted is to go into Developer Options on my Pixel 6 and toggle Disable USB Audio Routing On. This works great when it works, but the issue is that even with the toggle always on, when I plug my phone into the cable, it still attempts to read the media. To fix this I have to go into settings and re-toggle the toggle twice in order to get it to stop attempting to use the cable over Bluetooth.
I'm not sure if it is when my phone restarts that it needs the toggle re-toggled or whether it is just after x amount of time. All I know is that it doesn't work until I re-toggle it. It behaves as if it is off, even though it is on.
I really just wanted to leave this as a potential bug report, so no need to reply to this post, although anyone else with feedback or experiences of the same is much appreciated!