A federal judge has ruled that the government overreached when it declared certain types of gender-affirming care unsafe for young people