The only reliable way to get rid of this is to sign the executable. You need to buy a certificate from a trusted CA and these cost around 200 bucks a year. In the past you could send your executable directly to MS for inspection but that process could take a while. Could be instant or could take weeks. As far as I know Smartscreen will unflag an executable if it had seen it often enough without complain but this can take months if not years.
So the only definite solution is to pay for a code signing certificate and sign the executable. However the certificate MUST be stored on a device with hardware encryption so if you do not own an FIPS certificated device like an HSM you will get an USB token (with shipping costs of course). That is the reason they got so expensive lately.