I dunno about the USA, but for much of the world the answer is really simple: don't buy in places that have HOAs