Lots of people walk along or near tracks because they provide a nice level path. Women generally choose forms of suicide that are not disfiguring. If a woman is killed by a train, it is probably unintended, at least on her part.
So Tolstoy being a man wrote the ending of Anna Karenina wrong.