This happened to me constantly with my old phone (a OnePlus One from 2014 running Cyanogen, which is a clone of Android). At first I suspected a problem with the USB cable and purchased the original (way-too-expensive) VW USB cable. However, that did not change anything. Since recently I have the new Google Pixel phone, and it has not happened since. I connect the new phone with the "USB-A to USB-C" cable that came with the phone.
cheers,
Werner