Hello,
It is possible to restrict access to Desktop or Documents folder with TCC for a given application in macOS Preferences.
For example Terminal is not allowed to access Documents folder. But i have see it is possible to write files or to create directory from Terminal ! I don't understand this behaviour. Is there a particular reason ?
Thanks