The judge will block the Trump administration’s attempt to restrict funding for sex education from schools that teach it in an inclusive way.