also, if your inside of your fuel tank is dirty, draining and NOT cleaning tank out, cleaning a carb/rebuilding a carb can be a waste of time and that dirt in tank will just go right back into your clean carb and can block things right back up again on you!
trouble shooting problems, means to have to fully eliminate possible problems
yes draining tank helps, but honestly you needed to inspect the inside of the tank after draining to be certain it was clean inside
next, is making sure peacock is clean as well and good flowing out of it!
then over time, ethanol fuel can clog up fuel lines, so, next is making sure fuel lines from tank/peacock, to carb are clean(varnish build up can break off and clog a clean carb too) so, fuel line is cheap, just go new there, THEN clean/rebuild carb
do this in this way and your assured its NOT a fuel relate issue then, other wise, ay any point any up stream things can cause the issue again on you!
also, as jeep stated, maybe your fuel cap/tank vent is bad, and not working properly
when things get hot, vapor lock can happen in a tank that doesn't vent properly, and that will cause poor to NO fuel flow, and thus starve things and shut motor off on you
next time this happens, pay attention and OPEN the fuel cap and listen for the sound of air
if your hearing air rush, your vent is not working
OR< if motor runs when fuel cap is OFF, after it shut off on its own
LASTLY< it is summer time, and motors to run HOT< idling a motor is making more heat than driving atv about, NO air flow to help on cooling, so, could be your oil temp sensor is shutting you down due to oil temps too HIGH, or faulty sensor
OR could be from low oil in motor and getting too hot due to low level on you!
or OLD oil not cooling as it should
Clogged up oil cooler fins, also can play a roll here!
any how some food for though for you! and possible causes/solutions as well
clean oil cooler, check oil, make sure total fuel system is clean and working properly!(also, if you have a inline fuel filter, make sure it too is clean/replaced and installed the right way!
and make sure oil is good and at correct level