I spoke with the people working at a German resort in Tunisia. I was there for a short stint as sound tech. The only way out of the country is smuggling. You don’t get permission to leave if you’re of working age and can contribute to the economy.
The USA doesn't literally prevent you from leaving, but it uses its unique control of the global banking system to still tax you when you move to another country.