Had the same happen. I typically push up to turn off the engine, then put the bike on the stand, turn the handlebars and hit the lock button to both shut it down and engage the steering lock. Became muscle memory until the one time I didn't push it hard enough or notice the display didn't say goodbye to me and turn off. Faffing around in a carpark asking random strangers for a jumpstart is never fun. As I do commute to work on it routinely, I added a tiny jump starter from Motobatt to my backpack. Same size as an iPhone Pro Max but twice as thick:
Motobatt MBJ-7500B - oh, and ignore on the spec sheet where it says it has a compressor in it, it does not.