Breaking out a micro USB to Arduino's mini USB for power

Searched and could not find this particular problem listed.
And perhaps I'm going about this the wrong way. Any help appreciated

My project needs to have a box powered by a micro USB. The main PCB with an Arduino Nano will be buried within the box. I want to still allow data lines to feed into the Arduino, but need a switch to turn off power.

So... bought two break-out, small PCBs. One with micro USB and five pinouts (Gnd, VCC, D+, D- and ID). One with standard male USB (4 pinouts). the goal was to wire them together but interrupt the VCC and route to my power switch, leaving all other pins connected directly. I interrupted the power lines and routed them to a power switch. Worked no problem. I thought I could just wire the D+ to the D+ and the D- to the D- on the two breakout boards, leave the ID pinout from the micro USB not connected and then I'd be done.

But Arduino IDE does not recognize the Port now. Assume there is something I'm missing?
Thanks in advance

Why not just use a panel-mount USB extender? You can still cut open the 5V line and implement a switch.

You could also use external power (i.e. battery or wall wart) and you wouldn’t have to mess with the USB extender at all to install a switch, just a little wire soldering on your own part of the circuit.