When it happens, does it shut itself off after a few seconds, or are you doing something to shut it off?

There are several places it can potentially be back feeding the ignition, the 1 wire alt would be a good place to start. Past that, I believe I would look for a relay hanging up. Its going to be tough to find if its intermittent and only lasts a few seconds. Good luck! Gene