Haha, I have exactly the same problem with my iPhone 12 Mini too, except I use Waze and YouTube Music with CarPlay, and it only happens on hot summer days, although it was in the shadow.
My hack was to put the phone so I could aim one of the AC outlets straight at it, which solved the problem.
My hack was to put the phone so I could aim one of the AC outlets straight at it, which solved the problem.