The Muslim ban was always going to be unconstitutional. We all knew that when he started saying it during the campaign. He did it anyway, and now every single court has told him it's unconstitutional. Every level, unanimously, has returned the same verdict. He'll appeal it all the way to the Supreme Court, and they'll tell him the same thing.
And it still won't matter. He'll claim that he's right and the courts are all wrong all the way through to the end, just like he has always done. He can't admit he made a mistake, because he thinks that's a sign of weakness, so he's going to continue to insist that he is right and the constitution is wrong. I predict he'll start using words like "activist judges" or maybe "dishonest liberal courts" or something even dumber, to get his point across. Just like lyin' Ted and crooked Hillary, he'll give them a little nickname that his supporters will latch on to.
He won't really mind losing this one, though. It's all political theater. When the next terrorist attack or mass shooting inevitably comes, this buys him political cover. He'll say he tried to stop it, but the liberal courts interfered because they hate America and love terrorists. It won't matter if the attack is actually perpetrated by immigrants or Muslims or whatever. All Presidents fear a terrorist attack on their watch, and now he doesn't have to fear that anymore. He has built an excuse to blame his political opponents. If there is an attack, it helps him win re-election. If there's not, he hasn't really lost anything by being forced to adhere to the Constitutional balance of powers that he was always going to be bound by anyway.