Go to settings, type USB in the search bar and hit enter. Click on "USB controlled by". Make sure that "this device" is selected. You may have to do this every time you want to charge if it doesn't save the preference. (Like mine is doing for some new and unknown reason)