Forbidden Sabre\DAV\Exception\Forbidden error

If anybody is facing such an issue, which I had too, here’s a method which helped me.

For me, the issue here meant that a folder was not writable on the server for any reason. You can try this out specifically if you open Nextcloud in your browser, go to the specific folder and try to upload a small file manually. If an error message pops up saying access denied or something similar, you know that the folder is locked/not writable.

What I did then was to create a new folder on the same hierarchy level and checked again if I can upload something which was the case for me. If you have already files in the problematic folder, move them to the new folder. Then change syncing to this new folder and later delete the problematic folder.