Hi, It sounds like maybe your ignition switch is going bad. ( has dirty contacts). Do you use the kill switch to stop the engine? I had a virago where the kick stand switch would cause the bike to stop, it would kill everything except the lights. Good luck.
Live to Ride, Ride to Live, Work to support Life