crank sensor most likely.
it gets hot and heatsoaked and the sensor goes "open" (ie open circuit) because the metals expand inside when they get hot. it cools down a bit, metals condense a bit and the sensor works like it should and the car will start up, just to get the crank sensor warm again and "open" and the car dies.
you have a pretty "textbook" case.
go to autozone, pick up their tester, go through and find the crank sensor info (or just find engine speed) let the car idle until it dies, then quickly try to restart the car and watch the engine speed on the tester. if it reads 000 while the engine is cranking, you need a crank sensor.