Windows have taken the effort to fight ransomware with Controlled Folder Access, bleepingcomputer sais. It requires Win 10 Fall Creators Update, which is version 1709. Check your version. Enable it under Virus & threat protection if available.
*playing with Windows settings URI, making the settings links.