Negative tank pressure caused by fuel pump has to be offset by gas/air vapor filling the fuel tank. There's a charcoal canister in engine bay as part of the emissions control system. Gas tank negative pressure pulls vacuum on canister to allow displaced air to be put back in gas tank ( as the fuel pump does its thing). It's a whole sealed system. If canister is clogged, gas tank fuel pump can't overcome the vacuum caused by the clog and car stalls out. Over time (1 hour) tank gradually re-equalizes and fuel pump works fine again for a short period of time.
Take off gas cap and see if the problem goes away? You will get an emissions code (probably) but if car doesn't stall out you've found the issue. Easy to fix too!!!