I am facing the same problem. Mac OS 13.6.4 (22G513) Xcode 15.0.1 iOS 17.2.1. Apple M2 Max. Eversince the update from iOS 16, Xcode is not recognizing the device.
I tried renaming developer folder.
Turning off wifi
Turning off on developer mode and doing restart.
It might be something to do with vpn. Disconnected still no luck.
None has worked. Really disappointed.