the anti virus or Windows Defender cause that. I get same error. I solved by allow my application at my antivirus software settings under “allowed apps”
also should be allowed at Windows Defender.
Or you can buy a sign and put inside your code to pass Windows Smart Screen so your app will pass...