It’s normal for the high court to side with the government in these cases only for them to be overturned on appeal. That’s not my opinion, that’s the experience of immigration lawyers.
So yes, the policy is unlawful _in fact_ but the legal process needs to catch up to that.
They’re not ruling on legality, they’re refusing to grant injunctions on the flights.
This doesn’t mean they’re legal, it means the courts won’t stop those individuals from being deported while the legal case for the policy is being argued. The decision to grant, or not, an injunction is not in itself a judgement on the underlying policy. The court did the former, not the latter.
This will be challenged at the court of appeal and will, eventually, be found a breach of international law.