Install a fuel shutoff valve in the line between the tank and the carb and be done with it. This problem is so common that I have installed shutoff valves on three different neighbor's lawn tractors because they have all experienced the same problem. And if you don't get enough of the gasoline out of the crankcase after this happens, you can kiss the rod bearing goodbye within a few hours' of use (BTDT, have saved the pieces).
Back in the 'old days', every piece of equipment that had the fuel tank mounted above the carb had a shutoff valve on it. The only reason mfgrs. don't put one on now is because of cost-cutting.
There is a Briggs & Stratton p/n 698181 that has the inlet/outlet at right angles, or the B&S p/n 698183 for straight inline use. These are available for under $10 online and I buy them by the half-dozen.