Rough running after restart

I have a a 1995 GMC Sonoma 5-speed 4 cylinder pickup. When I drive this truck for any amount of time and turn it off for a few minutes(0 minutes - 1 hourish) the truck runs really rough for the first minute and almost dies. Then it will start running normally again after I’ve putted down the road a block or two. A couple of times this truck has died completely after running rough and won’t start again for almost an hour afterwards. Any ideas?

Does it ever smell like gasoline when you restart it ? As if it was flooded?

Pull the vacuum line from your fuel pressure regulator & check for liquid fuel. If you find any replace the regulator. If that doesn’t show anything then I’d just put a fuel pressure gauge on it & find out what is happening with fuel pressure when you shut it down. You may end up moving on from leaking fuel pressure regulator to leaky fuel injectors. Or onto the fuel pump instead.