If you're wondering the reason for why your executable file is marked as malware by your PC, it's because of the way that PyInstaller compresses all your files into one file (With the --onefile command)
If you would like to get your software whitelisted by Microsoft, you should use this link: https://www.microsoft.com/en-us/wdsi/filesubmission
This link will redirect you to a page on the Microsoft website. All you have to do is fill out a form and just wait until you get a response. It may be a lengthy response, but if you really care about your project, then it's probably worth it.
Hope this solution helped!