False analogy, even if your assumptions are accepted.
The Judicial Branch has no constitutional right to review immigration policy. His intent is irrelevant. In any case he has the inherent right to ban any group he wants for any reason. Foreigners do not have a constitutional right to immigrate here. All these cases involve elaborate ruses to get around that issue.
Trump has a clear constitutional right and duty to defend the country. That is what the court is attempting to interfere with. Trump might want to continue with the appeals, but whatever he decides he should announce that he is ignoring the decisions. Let the courts try to do something. He could have them arrested on sedition charges. He won the election on this issue, and I don't think any of his voters have changed their minds lately. Call the bluff of the congressional cuck republicans. Do they want to go into midterms fighting their president over muslim immigration?
Are you saying the courts don't have a right to judge the constitutionality of the Executive Branch's orders?
From what I have read, legal scholars aren't debating the court's right to look at this law. They are debating whether they should follow the "intent" or the "written letter" and that seems to be falling on ideological lines.
Trump can probably ignore their decision and have them arrested for not agreeing with him, but I think it will be a quick impeachment for violating the rules of our constitution.