5V needs to be cut. GND has to be connected.
There exist USB cables with a switch which in my experience do not work because the data lines are missing.
I am using a USB hub with power switches for each port to connect Teensy devices with external power and where the trace is not cut. It stays...