My 1995 Ram caused me much consternation in a similar manner.

It turned out to be “cavitation” in the fuel pump suction line caused by the sock filter being nearly, but not completely, clogged.

When the gasoline got warm enough the steady fuel pressure would suddenly drop to near zero and the engine would die.

After the fuel cooled just a little fuel pressure would return to normal, sometimes for hours or days.

Remove some of the cargo box bolts and loosen the others.
Jack one side of the cargo box above the fuel pump up to about 40 degrees to give clearance,
Watch the electrical wires in the rear near the license plate and do not damage them.
Remove the pump assembly and if you are on a budget clean just the sock filter at the bottom.

Since everything is apart consider spending $350 and replace the entire pump assembly.
If you do this go very slow and careful when removing the “anti rollover valve.” since it is not included in most pump kits.
I ended up cutting the anti rollover valve loose from the old pump with a cut off wheel on a Dremel tool, then trimming off the old pump parts to free the valve for reuse.