Grab the schematic for your specific Nano and trace the 5V switching circuit output to your USB connector. The units I have worked on have the USB supply directly connected to the 5V switch-over circuit.
So, with a hardware mod you might be able to switch the USB 5V supply line on and off.
I have never seen a command to turn USB functionality on and off, but maybe there is.