I tried reproducing the issue in a macOS 12 Monterey Intel-based VM by deleting ~/Documents (it was automatically recreated on reboot) and deleting ~/Documents then creating a new symlink with the same name in the same directory (as the author did) to a directory outside of ~ (the symlink worked fine, even after rebooting).