Since iOS 11, to improve security, iPhone will terminate USB connections after one hour, meaning you have to unplug and replug the phone, which is really annoying!
Here’s the fix:
Settings > Touch ID/Face ID & Passcode > USB Accessories > ON
I hope this saves everyone else all the time and stress I went through! (BG)