So no swapping once it is determined. Got it.
In reptiles.
In fish, like grouper, an individual begins life as one sex, full equipped and functional for many years, and the later in life, becomes the opposite sex, fully functional, and finishes life that way.
In the case of the fish, temperature isn’t the trigger. As I recall, it is a combo of age, size, and possibly whether or not there is a need in the population for one sex or the other, so it may have to do with one sex having the ability to suppress the sexual capabilities ir development of a competitor of the same sex. It’s not my specialty but grouper are well known for switching sex. It makes managing the fisheries for them fairly interesting and challenging.