US District Judge Amir Ali ruled in favour of nonprofit groups and businesses that sued over the funding freeze, which has forced organisations around the world to slash services and lay off thousands of workers