That definitely happened to me once and I had to turn Windows Defender off to get a full install of a gcc package I had downloaded from https://winlibs.com.
I eventually found a way to re-enable Windows Defender such that the problematic file was not removed ... but I forget the exact process.
I think there was some way of telling Windows Defender to accept that specific file, despite it being deemed malevolent.