I keep mentioning this, but the data pins on the USB-A end play a big part. I had a new Anker USB-C to USB-A cable, and it kept disconnecting from CarPlay. When I examined the cable, I saw that the Anker cable's data pins were recessed, so it lost connection more easily. I switched to a Google cable and it was fine.
But I'm not happy with the setup because I'm only getting 5W of power. I used to have an adapter which connected USB-C power and USB-A data out https://www.tindie.com/products/rkoripalli/usb-c-splitter-for-android-auto-apple-carplay/, which worked fine with Lightning, but now is only supplying power with the USB-C iPhone. CarPlay isn't working at all when I use it.
But I'm not happy with the setup because I'm only getting 5W of power. I used to have an adapter which connected USB-C power and USB-A data out https://www.tindie.com/products/rkoripalli/usb-c-splitter-for-android-auto-apple-carplay/, which worked fine with Lightning, but now is only supplying power with the USB-C iPhone. CarPlay isn't working at all when I use it.