Also check to see if you have stuff floating around in the gas tank. Suction can draw it to the inlet and once you shut it off it floats away. Had this happen on a walkbehind. Mower would run fine for a while and then cut out. would start back up after a bit. Screen at the bottom of the tank was broken and debris would clog it up. Cleaned the tank and installed a new screen, no more problems.
The reigning Mayor of Stupidville