Their home is at risk not because friend's mortgage is secured in OP's house, but because her DH is guarantor. The friend's mortgage is secured against OP's DH, so his income and anything he owns, including their home the entirety of which is a marital asset.
If the friend doesn't pay their own mortgage, the friend's mortgage company will come after OP's DH for the payments, they won't chase the friend he's already been deemed to have no money hence him needing a guarantor. When OP's DH can't pay friend's mortgage forever either, he'll have to sell his and OP's home to clear the friend's debt. Or else the friend's mortgage company will bankrupt OP's DH, so they'll lose any savings and expensive stuff they have (because those are marital assets too), which will be taken towards paying the debt. Also OP and DH won't be able to get a remortgage etc for their own home when the time comes, due to having a bad credit rating. Bankruptcy being as bad a credit rating as it's possible to have.
Being a guarantor could destroy their lives.
If someone needs a guarantor there's a good reason for that, it's literally because the financial institution offering the loan doesn't trust the person will be able to repay it - they've weighed up the odds, reckon they're likely to get shafted and are looking for someone else who they can shaft in turn...the guarantor.
If OP divorces DH now, she'll walk away with hopefully at least half of everything they own, then any risk from being guarantor is solely on her DH's head. If the situation goes tits up OP can walk away with her savings, property, credit rating etc intact.