While I agree with you, POTUS has absolute, clear as a bell authority in who is allowed into our country as well - but that hasn’t stopped some judges from usurping that authority.
That’s only because such judges have not gotten a serious beat down when they make the attempt. Nobody can “usurp” the authority of another unless the target allows such usurpation to go unopposed or unpunished. There should be a ZERO TOLERANCE policy for judges who cross clearly defined lines of jurisdiction. Impeach them, criminally try them, and then fine them into bankruptcy. I would have no mercy on such corrupt presumptuous officials. Make examples of enough of them, and this usurping behavior will stop.