If you charged your phone and using carplay and GPS, your phone screen should turn off automatically. So why would it overheat if the screen is off?
If the screen is on, it would be on the max brightness due to daylight. This plus GPS would increase power usage and heat.
Are you asking me why it gets hot? The answer is because Apple still hasn’t figured out the thermals.
Yes, screen is off but phone still gets too hot where it stops charging.