I had a lot of issues too, much og them cable related (USB-C). I've gone away from using my Xperia XZ (now on Android 7.1.1), as the current Android OS is quite buggy (IMO).
I'm using an Xperia Z3 now (my previous phone), and that works perfectly, no issues what so every, and I'm on the latest...