Are you still using version 3.0.1 or 3.0.0? Try updating to 3.0.2 and see if that fixes it.
There is no malware in GB Studio. Windows Defender gets data from Microsoft to tell it which programs could be malware, and in November 2021 they made it more strict. GBSToolkit (the library necessary to compile ROMs) looked unusual enough to be considered malware, despite being open source, and reliably used to compile every GB Studio 2.0 and 3.0 game until it got flagged.
Anyways, the bug should be fixed now thanks to Chris, who removed and rewrote the entire GBSToolkit library in Rust. As of writing, nobody using 3.0.2 has reported antivirus issues. You’re also free to join the discord if you’re still having issues building your game: https://discord.com/invite/dYeyUem