There's a big difference between detention and deportation of illegal immigrants and detention of legal immigrants and American citizens.
https://en.m.wikipedia.org/wiki/Treaty_of_Guadalupe_Hidalgo
Mexicans in those annexed areas had the choice of relocating to within Mexico's new boundaries or receiving American citizenship with full civil rights. Over 90% chose to become U.S. citizens.
But I thought my other point was more important. Most Americans are newcomers to the Americas, a few generations tops. Most Mexicans are not, and nobody really asked them before erecting new borders on their lands.
The entire scope of this discussion involves more that simply arresting and deporting people who sneak into the US illegally - it also includes a movement to redefine American citizenship in terms of generational purity.