> This is something that feels like it should be true but it isn't. The Constitution applies to everyone with some very specific exceptions to the jurisdiction of the United States.
Some parts of the Constitution apply to everyone. For example, the Fifth and Sixth Amendments absolutely apply to all persons, but a while a foreigner accused of crimes in the U.S. has all the same rights to a fair trial, speedy trial, counsel, non-self-incrimination, confrontation, etc., they don't have a right not to be expelled from the country instead of having the trial.
> What is true is that there's a long standing sort of gentleman's agreement between the courts and the executive that basically grants the administration a large amount of discretion in handling immigration despite the Constitution.
Decisions of the court are not "gentlemen's agreements". They are binding precedent.
Generally between the courts' interpretation of Article II and various statutes the POTUS does have great latitude as to removal of foreigners but not as to trials of foreigners. (Nor do foreigners not have the right to life, liberty, and property. They can't be summarily executed, for example, nor can they summarily be imprisoned. And they have the right to liberty within the parameters of their visas. And generally they have the right to property within the jurisdiction of U.S. law.)