Sounds like the starter solenoid is stuck closed. Not quite sure how that can happen, but I dont have another way to explain why it tries to crank as soon as the battery is reconnected.
2019 BMW C650GT, 2010 Spyder RT-S, 2009 BMW R1200RT,(sold) 2009 Honda Silverwing (Sold), 2009 Kawasaki 500 Vulcan (Sold)