It's actually worse than what I've read here from my experience. For one, this issue occurred on my iPhone 5S and my 2019 Prius Plug-in Hybrid car. I thought it was an issue with Google Maps / my very old iPhone, but I use that pretty much use Google Maps every time I'm in my car... So, I got the new iPhone 12 Mini this past December, and I assumed the issue would be fixed with a more up-to-date OS. But, nope. And not with any suggested workarounds mentioned here. I recently turned off Bluetooth entirely to see if that would fix it. But, nope. Not if it's plugged in to charge...
It's amazing this is still an issue with the latest iPhone and latest iOS. I can kind of understand this as a feature, but as something you can't control in Settings is beyond me.