OK, so I'm connected to a Surface Dock with an external 4K monitor. I notice that my Surface Pro reports that it's charging, and then stops charging. It seems to be doing this repeatedly over and over.
sounds like either it isn't seated properly in the dock or maybe you have some debris blocking the connection or it could be faulty charger... make sure you don't have any debris in the connector port...
Let me ask you this....Do you by chance have anything like a phone etc, plugged into the USB slot on the charger? Whenever I plug up my Galaxy S7 it will cause my machine to stop / start charging in cycles with the S7. Makes the USB charging port useless.
One other thing you may want to try - this method has cleared up so many issues for me in the past its a shame / awesome. Download the latest Surface Pro 4 drivers (Download Surface Pro 4 Drivers and Firmware from Official Microsoft Download Center ) and de / re -install them. This may or may not clear out your issue. Remember that the SP4 Battery / AC Adapter has a "Windows Driver" and it may have become corrupt. Please let me know if my suggestion helped.