I suspect the ability to leave at any time was a requirement of institutional review boards (IRBs) and consent laws (false imprisonment, anyone?).
Perhaps a way to do it and remove the ability to leave would be to send them to the International Space Station for an extended period ... (still cheaper than a trip to Mars!)
I suspect that even the ISS would still pose some significant logistical hurdles for such a long experiment involving so many people. I don't know anything about the physical setup of the on-Earth "shuttle", but I would hope it is larger than the crew quarters onboard the ISS (for sanity's sake).
The trade-off, I guess, is that the simulation becomes more real when one incorporates the very real dangers of space.
Perhaps a way to do it and remove the ability to leave would be to send them to the International Space Station for an extended period ... (still cheaper than a trip to Mars!)