Suspect an electronic cut out...maybe trace seat cutoff wires, make sure they are all plugged in properly, not loose. Bounce in seat, wiggle wires while stopped and idle...does it shut off??
Will it idle smoothly for a few minutes?? Checked/drained fuel filter??
What kind of tractor....tell us more.
ok...see your last post...
typically you can tip the seat up and there is a switch/lever under it with wires running to it. When vehicle is running AND moving AND someone leaves the seat (emergency) then the tractor is supposed to die immediately.
If the wires are not right, or the switch is bad, then engine can think that someone has bailed out of the seat and die in error...you are still in seat.
there have been reports of very light ladies who don't press the seat down enough to reliably press on the switch/lever, thus are bouncing in the seat and it makes it look like they have bailed out.
Have you been driving it and it just started happening, or are you just starting out with this tractor...not prying, just trying to understand when/why the problem started and what is different now from before when all was OK...
:welcome:to TBN.