@arza ,
Thank you for reaching out to the Microsoft Q&A platform. Happy to answer your question.
I also have the same issue as my device is managed by Microsoft defender endpoint, and I am sure your device also be part of it. Microsoft defender comes with a feature "tamper protection
, that will prevent us or the apps from taking actions such as
- Disabling virus and threat protection
- Disabling real-time protection
- Turning off behavior monitoring
- Disabling antivirus
- Disabling cloud-delivered protection
- Removing security intelligence updates
- Disabling automatic actions on detected threats
Not only that, Tamper protection locks Microsoft Defender Antivirus to its secure, default values, and prevents your security settings from being changed through apps and methods such as:
- Configuring settings in Registry Editor on your Windows device
- Changing settings through PowerShell cmdlets
- Editing or removing security settings through Group Policy
If you are a global admin, security admin, or security operations, then you can turn tamper protection on or off for some users using Microsoft endpoint manager. For more information, please visit the site.
https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/prevent-changes-to-security-settings-with-tamper-protection?view=o365-worldwide#manage-tamper-protection-for-your-organization-using-microsoft-endpoint-manager
Thanks.
----------
Please "Accept as Answer" and Upvote if any of the above helped so that, it can help others in the community looking for remediation for similar issues.