I have found that the most helpful documentation of gender is the death records of the person and their children.
I am supposing that when the DNA test for the sex gene becomes mandatory, that this will clear up a number of confused cases. And of course that a child lists its father's name is no definitive proof that the father was the father, as has been discovered more than once -- but I have not heard of a case where the father's descendant's Y-DNA test failed due to the father being female.
At best (or worst) it would merely register as an NPE. I'm not even sure this discovery COULD be made, that the man was actually a woman, in such a case.
I find it difficult to imagine a woman who died in 1881, and who served in the CW could masquerade as a male for over 35 yrs -- and be credited with x number of children but stranger things have been discovered -- but in that case the Y-DNA track would be absent, assuming you could test for it anyway.
That some females DID serve as line soldiers in the RW and CW, disguised as males, is known.
Someone better informed about DNA is needed here for a "DNA 101 for Dummies" course but I am reasonably certain in such a case it would just register as a NPE (lack of a Y-DNA track)
On the other hand in THIS particular case, this doubt seems to be banished by the supporting evidence (childrens' records)