First disable Tamper Protection in the Microsoft Defender settings itself. Then using Windows Powershell (admin) disable the real-time protection with the below cmdlet.
Set-MpPreference -DisableRealtimeMonitoring $true
Alternative method is using the Group Policy Editor.
Turning off real-time protection permanently even after restarting.
OPTION FIVE – Turn On or Off Real-time Protection for Microsoft Defender Antivirus | Tutorials
https://www.tenforums.com/tutorials/3569-turn-off-real-time-protection-microsoft-defender-antivirus.html
This link should also provide you with other useful things to switch off/on. Like disabling telemetry.
Microsoft has slightly changed some things so they may be worded differently. Such as Windows Defender is now called Microsoft Defender so older guides may not reflect that. Tamper protection needs to be also disabled.
Links & References
- Turn off Windows Defender in Windows 10 permanently – ALI TAJRAN
https://www.alitajran.com/turn-off-windows-defender-in-windows-10-permanently/ - Turn off Defender antivirus protection in Windows Security
https://support.microsoft.com/en-us/windows/turn-off-defender-antivirus-protection-in-windows-security-99e6004f-c54c-8509-773c-a4d776b77960 - Enable and configure Microsoft Defender Antivirus protection capabilities | Microsoft Docs
https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/configure-real-time-protection-microsoft-defender-antivirus?view=o365-worldwide - Turn On or Off Real-time Protection for Microsoft Defender Antivirus | Tutorials
https://www.tenforums.com/tutorials/3569-turn-off-real-time-protection-microsoft-defender-antivirus.html