I'm assuming you would try to get married to a "M" and in a place where same sex marriage is illegal. Taxes would be an issue if Social Security doesn't have "F" as a gender. If you have a heterosexual marriage, you're not supposed to file as single. But if you file as married, you're filing as same sex marriage.
In addition, regardless of your ID, if you are not "F" according to your state's rules (not the DMV's, but the rules for how they would determine sex without using any IDs), you're lying to government officials, etc. That is also illegal. I don't know of any state that considers the driver's license to determine your sex, it's secondary, not primary, evidence. Your genitals, DNA, or *presumed* DNA (what people think someone with your original birth certificate has) that states seem to go by.
In divorce, it could be an issue. It would probably be seen as a for-cause reason for divorce.
Finally, things like insurance and inheritance could cause it to be contested. Some people might have motivation to challenge it if there is mone or property involved.
There are probably other issues.
You might get away with it, but if it is challenged you would likely lose. I'm not a lawyer, so I very well could be wrong. But until same sex marriage is legal, I personally wouldn't try it.