Your mortgage is fixed for 15-30 years (depending on mortgage product), and your real estate cannot be margin called (unlike securities which are constantly fluctuating in price).
Edit: Over leveraging on margin to buy equities? Not great. Borrowing against real estate equity to invest in equities, with rent comfortably covering the debt servicing? Potentially not as bad. TLDR Manage your risk exposure appropriately.