I'm experiencing something similar since I got my iPhone 15 Pro (or iOS 17 - I'm on latest release as of today).
When I plug in the phone (USB to USB-C cable from Anker), it will hijack the audio completely in the car even though nothing is playing on the phone. I can't even switch back to radio on the car infotainment-system. My car is a Mercedes E400d from 2019.
Also, when it does this, if I start to play audio on the iPhone (I use Deezer), it will start the track but no audio will play.
I found a workaround for this is to make start a call and end it - then the phone starts playing audio.
It's almost like CarPlay thinks there's always a phone call going - this would explain the hijacking of audio.
I wonder if what you are seeing is the same as me here.