In a lab. Discussing science is different than engaging socially. In science, removing subjectivity is important. Socially, treating someone as an individual with unique experiences is important.
For instance, it is important when discussing climate change to use scientifically accurate language because the purpose is to understand the subject is the best objective way possible.
However, discussing someone's appearance may require nuance so as not to offend or confuse someone. For instance, I know several people who had brown eyes when they were young, but now appear to have blue eyes as elderly people. This is due to arcus senilis. I am unlikely to discuss that around the person in question since it calls attention to age and a physical change they may not be comfortable with.
(Note: their genotype in this case does not match their phenotype. Appearance is often tricky and intimately tied to a person's emotions.)
Science recognizes the need to change terminology based on the personal nature of definitions where this does not interfere with the objectivity of the science. For instance, what was once mental retardation is now intellectual disability, and even that used to be termed using words like "imbecile" and "moron." Due to the vernacular use of these as insults, psychologists changed the words.
Consider then, how it makes sense to distinguish between one's social identity (gender) and one's biological characteristics (sex). Also consider that the differences between the different elements of biology (genetic, physiological, chemical, psychological) can further complicate the line between the social and biological aspects.