Note that many, many animals have non-genetic sex determination. Most fish, amphibians, and reptiles have the same genes for both males and females. Sexual differentiation typically depends on things like the egg temperature or salinity and so on. Some species can even change sex during their adult lifetimes, with external conditions triggering a complex hormonal shift that convert an adult, fertile male into an adult, fertile female.
Having genetic differences between males and females is mostly a bird and mammal thing, at least among vertebrates.