There are special exemptions on inheritances that happen during the marriage, but you have to be careful with commingling assets and it depends state to state. Like if you provide the down payment, but split the mortgage, the house is 50/50 owned
In California and many states, inheritance and gifts are always sole property of the recipient and not considered community property. My ex was gifted property from a relative during the marriage(so they could illegally claim state benefits, but that's another story), and it was not even on the table during the divorce.
In CA, if you provided the down payment on the mortgage with non-community money and then used community money to pay th mortgage, you could ask for the non-community down payment back and get 50% of the community interest in the home after that.
This is false. Courts generally uphold prenups. You only hear about the times they don't because that's news. See, for example, the McCourt divorce (upholding a postnup).