Sounds like the main connection under the tank but if you've already looked at that then maybe not. My bike done this after a long wet 200mile ride, stopped at the B&B, switch key off but the bike kept going. Owner put the bike on his garage and all was OK the next morning. That was home day anyway and the tank was removed the next day, every connector cleaned and covered with bicycle inner tubes, no trouble since. I've also had earth lead troubles but that's a no start not a no stop issue. Good luck with finding it.