Horror Stories - Seller owns real estate

Recently came across a colleague that went thru one of the worst stories I have ever heard. Seller kept land and real estate, they had a two year non-compete clause. Once it ended, seller opened a competitor on the same property, poached the entire workforce and decided not to renew lease to buyer.

Wondered if people had similar stories and how to best avoid these, should clause had been longer maybe it was okay?