Twice in ICE and Twice in EV.
First time ICE, parked on a steep road, technically had fuel but sloshed to side of tank away from pump, car wouldn't start until a gallon added. Second time in a Classic Triumph Spitfire where gauge reported quarter of a tank, it was empty spluttered to a halt about 1 mile away from petrol station
First time in EV was Zoe, had had a couple of close shaves over the years then in final year of ownership (last Fireworks night), charger blocked at destination meaning a slow drive home, ran out miles from home but only 2 miles from a charger. Stop/restarting got me to within 200ft of charger where I finally needed a push. Summer this year I ran out in the MG, head wind and a banging head ache were what let me down. MG powered through the headwind like it wasn't there, my headache meant I wasn't paying sufficient attention to mpkwh, ran out 6miles from home, MG doesn't do stop/start trick so had to get a flatbed (my first time ever).