Hi Dominic,
Its quite likely that this is a bug, where Windows Defender flags things because of their presence in detection history.
To resolve the issue use one of these methods:
Method 1
First boot into safe mode:
Delete the DetectionHistory folder from:
C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service\DetectionHistory
Restart your computer.
Note: To see the ProgramData folder and subfolders, make sure you are showing hidden files and folders.
- Windows 10: In File Explorer, select the View tab > check (tick) Hidden items
- Windows 11: In File Explorer, select View > Show > check Hidden items
Method 2
Use the tool I wrote specifically to delete detection history. There's no need to boot to safe mode, just unzip, run and restart.
https://1drv.ms/u/s!AqQnVFhmcB_wnjF63snXqEvSZyOh?e=42ACHv
Run it a second time if it fails first run.