I can't say I've had the wind switch 180 degrees. That would probably do it. I usually listen to the forecast and anchor in the lee of land, especially when bad weather is imminent. In upstate NY on the Great Sacandaga and Lake Champlain, I always made sure I had land to the north and west of me.
Actually, I did drag once, in Tyrell Bay in Carriacou. The holding was awful and another boat dragged his anchor at night. He turned on all of his deck lights and pulled his anchor up, and on leaving T-boned my boat. After bouncing off us, he motored across our bow and over our anchor line and we dragged and had to reset. I don't think that counts.