I'd like you to go through this list of items to check to see if any of them turn something up at a macro-environment level. I've run into all of these as sources of failure at various points in time.
Verify every link in the device connection chain. For a device plugged directly into a Mac with a USB cable, that means verifying the Mac, the cable, and the device independently from each other. If there's any other links in the USB chain to the Mac through a hub or dock, it also means removing those. Sometimes cables fail, I've seen it happen many times, so always use a cable that is in good condition. Further, make sure to test using a cable from Apple so that you know you're using a cable that correctly implements the hardware specifications. And on the device end of things, I've seen where just enough pocket lint got into the port and prevented a solid physical connection too.
As part of ruling out the Mac component in the connection to the device, it can be helpful to verify with a clean test Mac environment. Ideally, this Mac is only minimally configured compared to your real environment, to rule out things like VPN and security software interfering, or restrictions enabled by a managed enterprise environment on either the Mac or the device.
If everything's working well in a clean Mac test environment, then that points to something in the your normal macOS account interfering with the device connection. As I already mentioned, VPN and security software are often the cause here, so make sure to disable those and see if it makes a difference. If it is something like that, make sure to consult with the vendor, or your IT department, to get that software updated according to the advice in our Technote.
If you've ruled out all of these things, but you still have trouble connecting your device to Xcode, then its time to open a bug report. A crucial part of reporting this type of bug is to include sysdiagnose logs from both Xcode and from iOS. If it comes to this, make sure to post the FB number here for reference.
— Ed Ford, DTS Engineer