I am saying that gender affirming surgery necessarily changes the reproductive ability of a person, which according to the definition of sex that ascribes it to reproductive ability means that gender affirming surgery necessarily changes a person's sex.
If the ability to become pregnant determines whether a woman is female, as that narrow definition denotes, then postmenopausal women and women who have had hysterectomies are not female. If the ability to father kids determines whether a man is male, as that narrow definition denotes, then men who are sterile or who have had a vasectomy are no longer male.
The counterfactual would hold true as well: if the inability to become pregnant determines that a person is male, then a person who has gender affirming surgery and is no longer able to become pregnant is, by that definition, male. If the inability to father children determines that a person is female, then a person who has gender affirming surgery and is no longer able to father children is, by that definition, female.