All Microsoft has to do to stop that from being a problem is to tell Defender to block that automation from running on Windows, for example, by refusing to run anything signed with the automation developer's certificates.
yeah thats true, you can get around some stuff with modified keyboards, accessiblity access, automated mouse but then you are just hacking things together at that point