The nice thing about anchoring while diving, is that you can check the anchor placement and (at least in my case, where we are generally anchoring into rocks...) you can wedge the anchor so that it can't move at all. As long as you remember to free it before you go up, Bob's yer Uncle...
Having said that, I rarely.. RARELY... anchor and leave the boat unattended. Call me a chicken-sh!t, but I hate long swims in dive gear!
Years ago, just as I got back to the anchor, the line parted and the boat stated moving. The line had gone slack, wrapped under a rock and chafed through, just above the chain. I caught the line in my hand, but lesson learned!