I had a nano power regulator blow out when I tried uploading a sketch while I was supplying 12V to the VIN pin and had the USB plugged in at the same time. I realized I had two normally open reed sensors wired to ports D18 and D19 (respectively the SDA and SDL ports) as pull-up resistor inputs. Before I plugged in 12V to VIN and just was powering my set-up via USB things worked fine. That is to say my sensors did their job and a light wired through D2 went on to indicated when either sensor was active. Then when I tested my set-up with 12V to the VIN alone I noticed my lights were going on when the sensors should have been open. I plugged in the USB and tried uploading a correction to the sketch, the upload process wasn't working and before I could do anything I started smelling hot electronics. After some time and investigation I realized I didn't have my sensors wired to proper input pins. I rewired my circuit with a new NANO Every and everything works fine under 12V power.
Here's the thing I'm scared to upload a sketch or even plugin the USB while 12V power is being supplied via VIN. Should I be? Did I only have a problem because I uploaded a sketch while I had the SDA and SDL ports coded as pull-up resistors? Is it best practice to just cut-off any unregulated power to the board when uploading a sketch in general?