Did you also wear your USB-Port with plug-in plug-out.
Especially when i test my code on NodeMCU, ESP8266 and Arduino Devices. Thanks god i found a perfect USB-Switch.
Just plug the Adapter in your USB-PORT. A LED shows you the status "on" "off".
Build your circuit and then just press the button to turn it on. :)
I use this for my NodeMCU and Arduino Projects, currently it works like a Charme.
You can find the switch for example here: