As long as we limit the payable tax to the sale price of the home, then you're not screwed. It would suck to have all the money disappear, but if you didn't pay your mortgage then you would also owe the entire amount of the sale price too.
Yes: if you invest in something the value can go down, but I don't think the government should compensate you for that. You should just be careful where you invest your money.
This isn't always true. It doesn't happen very often, but if you are not underwater after a foreclosure, the bank owes the owner the difference.