The ruling is a setback for Prime Minister Keir Starmer's efforts to stop people crossing the channel from France in small boats.