To be fair, the way shimano do this is that the motor powers down with some charge left in the battery for the display and shifting to keep working. So you might get a few hundred meters less of range, but still plenty of shifts to get home. (That said, pedalling a full fat 24kg ebike in off is a miserable experience even on the flat.)