I've tried every option mentioned above on my Subaru Crosstrek with both an iPhone 14 and in the last month an iPhone 15.
On Carplay the phone overheats to the point where it disconnects from Carplay and stops playing. At that stage the phone is very hot but not usable as - well it's kind of obvious that it should be able to do a trip on Carplay without Carplay failing and cutting out / disconnecting because of overheat.
A friend bought exactly the same car as me and I asked him his experience to compare.
"Howsit , nope I'm on Android Auto .... Samsung Galaxy S22+ and no problems"
The only solution is to use a cable to charge (which is a bit of a waste as the car has cable free charging and cable free Carplay) and put the phone in the airvent to keep it cool as someone suggested.
I know many people have insisted that it is normal for an iphone to get hot on Carplay but well, I just can't see that it is a feature that unless you put your phone in the airvent you can't use it for more than 20 minutes on Carplay before it stops working.
An iphone left in the sun will eventually say that it is too hot and stop working. This is not the case here although I suspect it would eventually pop up that message if left charging. But Carplay stops working and disconnects or the music starts to crackle and break up as it gets hotter. So while I don't have the overheat message, the phone is pretty useless if I can't listen to music while driving.