MacBook Pro (Retina, 15-inch, Mid 2015) not charging connected iPhones via MBP battery?

Often my MacBook Pro (Retina, 15-inch, Mid 2015) is unable to charge connected iPhones; even the data connection seems very unstable. This is when operating the MBP on its battery. When I connect the MBP to a power outlet everything works just fine.

Weird thing: I had a different MacBook Pro before (though also Retina, 15-inch, Mid 2015; maybe even from the same batch) that had exactly the same problem.

Is this a know hardware issue? Or can I do something in a software setting?