Good question
I have never experienced that situation but I am sure it could happen. I guess in a confined area all you can do is ask the person to pull his boat up to allow you to pull up anchor. I think people need to use common sense and not anchor where they will drift over someone's anchor, surely he could see the current, wind direction, tide etc. and simply allow for it. I think thats the answer to your question. Common sense.