I also have issues with running python to an exe, Since I want it to be a standalone application that doesn't require a user to install the libraries or python, I used pyinstaller and windows deffender just blocked it, I haven't tried any other like py2exe or nitko? (i think its called nitko)
Windows Defender is easy to trigger onto anything that does not passes its AI checks and does not have certificates