jader
Did you search with google, there are many requests for this & many varying answers.
It will probably depend on the systems being used & how much effort & time you want to spend manually changing folder permissions etc, with limited or varying success.
IIRC the simplest thing to do was to change behaviour so that when drag & drop is used it asked for confirmation. That at least prompted the user if they really wanted to go proceed with their accidental or unintended folder move.
It is so easy to do if the mouse is slightly moved as the button is pressed, so a warning message gives the user a chance to cancel the move, without actually preventing them from moving it. Not an absolute blocker, but a workable practical answer.