Apple Carplay is very sensitive to cable length and quality. I use the shortest cable that I can use (never more than 3 feet) and I make sure it’s an Apple MFI certified or Apple original cable. I also don’t mess with the phone while it’s connected since I know the cable is so sensitive. I have had zero issue connecting to the Raptor or my 2017 Mercedes via wire.
Ever since I switched to Wireless Carplay via the dongle above, I can hold the phone while connected to Carplay. If I need to charge it, I charge it via a USB-C (high speed charger) cigarette lighter plug in the armrest.