These stories are actually impossible with keyless entry. My car has keyless entry (2009 Hyundai Genesis) and if the key leaves the vehicle, you get a beep and warning message immediately that says "Key not in vehicle", and the car continues running, forever, until you stop the engine. The only way you could end up somewhere with a non-functional vehicle is if you threw the key out the window (or gave it to a friend), ignored the constant beeping and warning messages, and then proceeded to drive away, park the car, stop the engine, then get out of the car. You still wouldn't be able to lock the car doors without the key.
Cars that immediately stopped the engine while driving would be considered a safety hazard and no car company in the world would release a car like that. Imagine if your engine shut off at 70mph on the freeway.