As you were told when you posted, laws vary by state.

Typically, joint earnings during a marriage as well as fund commingled in the family amount are treated as a marital asset, not something you can after-the-fact claim to be your separate property. If you don't want her to be able to withdraw money you put into a joint account in order to pay for her lawyer, don't put money into the joint account.