To fix this you basically pay a lot of money to someone to send you a certificate that you then use to sign the EXE. The whole thing (imho) is a bit of a scam, as these certificates are INCREDIBLY expensive for what they are, and they provide little real guarantee to the end user, as there is nothing to stop malicious users from buying a certificate (
and this happens a LOT). It also doesn't mean that Windows Defender won't cause issues either, which is another common thing I0ve seen! So, basically, you pay a lot of money to get a CA to give you a *.pfx file which you then use along with
MS sign-tool to generate your signed EXE, but there is no guarantee this will actually be of any benefit to you.
I would honestly say that unless you are sure you are going to recover the money paid and that a LOT of people (like hundreds of thousands) are going to download your game, then it's just not worth the bother. Most PC owners are aware that the warning is simply Windows being overprotective and will run the EXE anyway as they know where they downloaded it from and know the risks involved. If they downloaded it in the first place, then it's a fairly safe bet they'll run it too.