Correct, your program is not allowed to write to its install directory when it is installed for all users.
If your app is not marked as UAC compatible then Windows
might allow the write by redirecting the file for that user, this is called UAC Virtualization:
https://www.microsoftpressstore.com/...8450&seqNum=9#. I don't know if Windows 10 supports this but Vista, 7 and 8 does.