That is a marked difference.
The Berlin Wall kept people in - the Mexican Wall keeps people out
Unlike a prison, the wall would have a well-defined door, through which tourists may pass, and those who come to America to seek citizenship, may come through in orderly fashion and only after scrutiny of their intentions.
The door through the wall is meant to swing BOTH ways, not to simply keep Mexicans and others out. Right now, should a US citizen choose to enter Mexico, is is understood that the RIGHT path to entry would be followed.
Try taking a shotgun with a slightly too-short barrel into Mexico, see where that lands you. US Marine reservist Sgt. Andrew Paul Tahmooressi wound up being jailed for seven months, on a weapons charge, and suffered considerable abuse while in prison.