Sounds like it is running out of fuel.
Buy a spark tester, install it then watch what happens as the engine cuts out.
Flashes all the way to the bitter end then definitely fuel.
Flash breaks up then electric.
SO you have cut the diagnosis time in 1/2 .