A judge made the "wrong decision" in letting a family from Gaza settle in the UK under a Ukrainian refugee scheme, Sir Keir Starmer has said.