Truck had vacuum leak. Fixed that issue. Now truck dies after 25 minutes of drive time. No warning. Battery is fine. Replaced fuel filter. No change. After an hour of cooking down truck starts and works fine until the next occurrence. No warning.
It acts exactly like a crankshaft position sensor starting to fail. dies when hot, restarts after cooldown. It looks like this but since you didn’t say which engine you have this one is for a 4.6L V8
It might be a camshaft position sensor but I don’t think that shuts the engine off. Scan the troubel codes stored as well. It may store a P0335 code for the crank sensor or a P0340 for a cam sensor.
Since it is 12 years old, I’d check the fuel pump, too.