There’s also the fantastic app BlockBlock to help with this. Notifies you of changes to those folders and allows you to accept/deny whatever an app is trying to change.
https://www.peterborgapps.com/lingon/
https://www.peterborgapps.com/lingon/#preferencesnotificatio...