Federal dollars in the two health insurance programs would not go toward gender-affirming care, but states could still cover the treatments.