Sportsman dies randomly with headlights on

2014 Sportsman 400 how
50 hrs 600 miles

I’m supposed to be going on a big trip here soon and my machine just did the random die again and my thought is that it is only when the headlights are on and I go over a big obstacle. Just randomly dies like I turned the key off but the key is still on, turn it off and it starts right back up. I’ve read a few forums about this and didn’t get any good answers. The machine is practically new and I’m not very hard on it. I’m quite sure it’s electrical but I don’t know much about electrical. What do you guys think? I’m going to lose my mind if this thing just dies in the middle of my vacation. I’ve changed the oil and air filter once. And it had a new gas tank put in because of a leak the first six months I had it. It has a dealer installed polaris 2500 winch.