Mortgages are typically issued as non-recourse loans. This may not be true for HELOCs or other risky equity loans, but usually your lender can’t seize your home unless you haven’t been paying monthly.
When people say "you should buy real estate as an investment because you can't live in your brokerage account" and then do crazy stuff with their equity that they wouldn't even dream of when investing (e.g. Boglehead investors who HELOC for some net negative remodel) it really blows my mind...