The interim order came after a decision in June on medical care for transgender youths and as the justices prepare to hear arguments on transgender athletes.