In addition to the reasons described above, the problem may be in your antivirus. An effective paid antivirus (for example, a paid version of Avast) will be more constructive. And to protect against ransomware, I installed this defender
http://myspybot.com/redboot-ransomware/