I'm voting for the filter.
Runs hard, fuel pumps pushing the dirt against the filter, clogging it, car dies.
Shut car off, pump stops, dirt falls, start car up and it's OK for a while.
Gas car up, runs good for a while because..............sorry, I got nothing for that.