I'd love to know if anyone has seen a court void a marriage for this. I don't believe any court has.
That said, plenty of states have laws defining marriage as "one man and one woman" and DOMA uses similar language. Of course none of these things define man and woman, nor are other government laws that do define them (particularly administrative regulations for birth certificates, passports, social security, drivers' licenses, etc) necessarily apply to marriage.
My understanding is that if you are in the US, DOMA might apply for federal benefits. It might not too, if you think the federal government would NOT recognize the post-transition sex. But if they did recognize it, they don't give married benefits to same-sex couples due to DOMA. It would probably take a court case to figure out if they recognize it or not. Hopefully that will change very soon and DOMA would be eliminated. However, there is no need to divorce because of DOMA. But I would be careful with tax planning and such - talk to a legal expert (and even then you are probably taking a bit of a risk, no matter what you put on your tax return for filing status).
As for state laws, if you are somewhere that allows same-sex marriage, you have no problem.
If you are somewhere that doesn't allow same-sex marraige, some state laws might apply that define marriage as one man and one woman. You might not be forced to divorce, but you might not be recognized as being married should it come up legally. It would really be entirely up to the courts and how they decide to rule.
There is no safe marriage in the US where one partner is trans and one partner is non-trans, whether that marriage is same-sex or opposite-sex. Different courts have recognized and not recognized sex reassignment.
All of the above assumes a surgery occurred (which surgery is a whole other legal mess). If no surgery has occured (I.E. your wife has male anatomy still), even if she had her drivers' license changed, I believe she would be recognized as male for purposes of marriage. There's no one legal definition of sex. So just because the state or feds let you change a document doesn't mean that that new designation applies to everything. Changing your driver's license (or any other document) does not change your sex. It changes a letter on a document. For some uses, that means you are now treated as the new letter. But that letter doesn't necessarily change how you are seen by every aspect of government.
For me and my wife: we know we are a heterosexual couple and expect the State and Feds to recognize that. That could bite us, as we have no guarantee that we would be seen that way. But I'm willing to fight the law if need be, as is my wife. I also can't imagine NOT marrying her. But we have taken many legal measures to protect ourselves just in case, too. And we know what the risks are if a court rules the wrong way. I'd rather potentially break the law than not be married to her. That said, should the state laws change to allow same sex marriage, it very well may one day make sense for us to divorce and remarry, as that would guarantee that our marriage couldn't be challenged (if the marriage was entered into illegally, even if it would be legal now, it wouldn't be considered valid).