Identical twins' biological sexes
Identical twins occur when a single egg is fertilized to form one zygote, which then divides into two separate embryos. Thus, identical twins are always the same sex unless there has been a mutation during development. 

However, two identical twins expressing different sexual phenotypes does happen in some extremely rare cases due to environmental factors, deactivation of different X chromosomes in females, or aneuploidy. This is normally because an XXY Klinefelter syndrome zygote has split unevenly.

You are correct though, in that identical twins usually have hundreds of genetic differences early in fetal development which can be attributed to mutations in the DNA. But usually these differences do not result in twins with different sexual phenotypes, though it is possible.