Most of the time, it's not the car, but a cable or a dirty port. We had a new cable out of the box have issues with carplay. We managed to get it swapped by Tmobile and it fixed the issue.
Whenever I have random disconnects, I clean the port on the phone, and sure enoug,h chunks of lint come out.