But that doesn't stop units in cities from going out, just the character.

As far as I know it is not possible. And certainly not if you wish to have some units staying in and others free to move.