These are not applied on disk, they're injected at runtime. Just open the process and write to its memory directly.
https://en.wikipedia.org/wiki/Executable-space_protection#Wi...
Even if the page is marked as non-writable, execute only, you can pause the process, change the permissions and resume it or do it at image load time without issue.
Windows applications using the old/standard win32 api don't have sandboxing between them at all and any application is free to tamper with any other to an almost limitless extent. It's incredibly powerful, in both good and bad ways.
Certain advanced firewall tools with IDS style features can hook these calls and notify you when an application is attempting to do something like this.