It’s unfortunate you can’t just transfer a mortgage to a new home.
If you could, then it wouldn’t matter if the market tanked.
Yes you would still have your $600k mortgage, but if you sold that $300k house and moved to a different $300k house or a $250k or $350k one (since the market tanking would bring the value of all houses down), then you aren’t in any worse of a situation than before.
The way it is now though, I believe, is you would have to sell the house, be in debt, and not be able to get a new mortgage for another house.