2002 sportrax 250ex dies at higher speed

Been having issues with my sportrax 250. Starts and idle perfectly fine, when I ride it for for more then 5 minutes the atv randomly dies and can’t start it unless I wait like 5 minutes. I noticed that when it dies I can’t get my green neutral light to turn on but as soon as it does turn on (after 5 minutes) the atv starts right up. Any idea what can cause it to no go into neutral when it dies? I was thinking maybe a bad voltage regulator?