There are well known examples such as Jewish populations in WW2, and some of the ethnic minorities in Khmer Rouge Cambodia, who although considered an enemy population, were prevented from leaving a territory, because the government of that region had decided to kill them at a later time, or to one way or another dispose of the population in ways that were incompatible with permitting them to leave.
What are the other cases in recent history where this happened? In Rwanda the Tutsis were barred from leaving once the massacre began, but things proceeded very quickly and I do not know whether there was some prior restriction on travel to set the stage for the atrocities.