I tried a few things that seemed to have worked for me. Please note I am not exactly sure if all these steps are required but this is what worked for me.
Phone:
- Update your iPhone to the latest iOS version.
- Under Settings -> General -> Reset -> Click on "Reset Network Settings" (Doing this will reset your Cellular, WIFI and VPN settings)
- Restart your phone. Even better if you do a soft reset. (iPhone 7+ press and hold at the same time the Lock button on the right side as well as the Volume Down button on the left side. Keep holding it until the device turns off, it should turn itself back on if it does not then you did it wrong.)
- Turn off WIFI and Bluetooth.
Car:
1. Disconnect all iPhone cables from any USB.
2. Turn on car, go to your Apple CarPlay Connection settings and remove your device from the list, to do so click on the device and then Edit and from there you'll see an option to remove the device.
3. Perform a Factory Data Reset. (This will reset your car's settings of course.)
4. Turn off car, wait 30 seconds and turn back on.
5. After car is back on, wait for the home screen to fully load. (Click on Ok if driver warning message pops up and give it at least 30 seconds)
6. Once car has been on and home screen has been loaded, connect the USB cable to the USB port on the car, and then connect it to the iPhone. (Not sure if this helps but have your iPhone unlocked and on the Home screen when you do this.)
Apple CarPlay should now work. I am not sure if having Bluetooth/WIFI on will affect the connectivity in any way but I always have it off just in case. Also going forward whenever you start your car, wait at least 30 seconds after home screen is fully loaded before connecting your phone to the cable. Similarly before turning off your car, disconnect your phone from the cable and wait at least 30 seconds before turning off the car.
Some steps may be unnecessary but this is the method that worked for me and it's been a few days. Will report back if system fails again.