When my bike was doing this (a little over a month ago), I pulled my battery all the way out, cleaned both + & -, cleaned & sanded the frame grounding point that's there near the battery, cleaned & sanded all of the terminal on the wires and applied dielectric grease to all electrical connections as I put it all back together.
Up until yesterday, it hadn't happened again. But sure thing it did it again. But that "may" have been brought on by me going thru the engine mounting bolt torque sequence. By undoing the bolts and retightening them, I "may" have disturbed a grounding connection to one of the components. Not sure thou. But like I said in my earlier post, there is suppose (so I’ve been told) to be another harness grounding point somewhere under the tank. That grounding point "may" be less than ideal. So as soon as I get time and have little fuel in the tank, I'm going to try and find it. But up until then, I’ll just have to live with it resetting every once in a while.