Mammals don’t, birds don’t. Bacteria & insects are another story though. They have not evolved as much.
Interesting:
https://allthatsinteresting.com/sequential-hermaphrodotism-sex-changing-animals