Personally I feel like buying housing, at least in the UK, makes a lot of sense. However, I have a friend who is currently in that kind of situation where it's certainly made me think twice.
She bought a new built flat about 5 years ago in the outskirts of London. Following the Grenfell disaster it has gotten caught up in the inspections for fire safety and is now practically worthless until ~£70k worth of remedial works are carried out. She cannot remortgage it, she can't rent it out and she can't sell it. Pretty nasty scenario.