That link seems very different to how you were characterising it :
"In June 2022, an ECHR judge used that power to temporarily stop the first Rwanda flight, until the migrants on board had had a chance to put their case to British judges.
That delay in the flight allowed the migrants to take their case to the UK Supreme Court, which ruled last year that the entire plan was unlawful."
So it was the UK Supreme Court that ruled the plan unlawful, not the "foreign court" ?
As I understand the plan, it is to send Asylum Seekers, rather than"illegal migrants" to Rwanda to have there cases heard. If , in Rwanda, they are found to be genuinely seeking asylum, then they will stay in Rwanda