Open the Group Policy Editor.
On the left navigate to Computer Configuration -> Administrative Templates -> Windows Components -> Windows Defender
On the right look for Turn Off Windows Defender, right-click on it and choose Edit.
Toggle the selector to Enabled then click Apply and OK.
Exit the Group Policy Editor.