If the engine is in an enclosure, it could be too hot. After shutdown the engine is hot but coolant isn't being circulated. The engine cast iron heats everything around it because it's no longer being cooled. If the fuel gets too hot it can boil, creating bubbles and pushing some fuel back to the tank to make room. Starting again would make the engine sound similar to needing fuel bleeding.
Generator start circuits usually bypass the sensors that shut down the engine for low oil pressure and high coolant temperature. When you let go of the button it switches to the sensors. If your engine coolant temp was over the auto shut off temp, the engine would stop as you let off the button.