Power Question how to disable voltage on USB 5+ but still allow charging

I am using a microcontroller that allows for a lipo to be connected, when it is connected I have 2-3 volts(depending on how charged the battery is) on the USB 5+ wire. Whether it is on or off, that voltage is present and I would like to disable that from being available on the USB but still allow charging. I am using a cable and adapter/port to put this in a weather proof enclosure…hence why I want it to allow charge, but disable that voltage just in case moisture.

Thanks.