As others have said it is probably the fuel pump. One other easy test is disconnect the fuel line coming to the pump, install a short fuel line from the pump inlet to a gas can. You only need 3 feet or so of fuel line. If it continues to run with no symptoms, you may have a cracked fuel line coming from the gas tank. I chased this same issue on my 2000 Onan 5500 for several weeks before finding the cracked fuel line. It always seemed to be worse in hot weather and I thought I was having a vapor lock issue.
Not expensive or very hard to run the new line. Mine had a couple of metal sections on the run and I replaced all of the line including the metal with new rubber fuel hose. I tried just replacing the rubber sections and it would still quit running. I have not had any issues since.