In the thread about your bike losing spark and dying I suggested that you verify that everything is connected as per the wiring diagram. You said everything was stock and working.
I also asked whether any fuses were bypassed. You did not answer this question.
The reason I asked about the fuses is that I suspected the previous owner had bypassed them. Depending on how badly the previous owner mangled the electrical system it's possible that a short to ground happens when shifting out of neutral.
IF everything were connected properly, working, and fuses were not bypassed it would simply blow a fuse.
BUT, if the fuses were bypassed it could sink enough current to stop the ignition circuit from working, making you lose spark, and killing the engine.
Trying to troubleshoot a bike with electrical issues while only selectively connecting what you think you need for it to work, will not work.
You need to go through all the wiring, checking it against the wiring diagram, and connecting it properly.
Like actually this time.
Connect it how it should be connected. Understand how it should work. Then you can change it to how you want it to be.