Arduino Nano acting strainge when disconnecting from PC

nijmedw's image from post #5

You can not control 12V led strips from a 5V microcontroller. You will need something that can take 5V in from the microcontroller and handle 12V output; usually logic level fets (or transistors).

I'm surprised that your Nano is still surviving.