In traditional finance, the brokerage you are working with may notify you and ask for more leverage. Or to warn you if the risk calculation is about to change. It's pretty flexible.
This is specifically a crypto problem where everything is automatic and decentralized.