This is essentially the same question that you asked in this thread.
Again, I would suggest that you would be better asking this question in a developer specific forum, since those users would be more experienced with this issue. Maybe here: https://developer.microsoft.com/en-us/windows/support/
From what I know and have seen over the decades of installing and supporting software, most applications rely on a license key of some sort. The application installs on the machine but looks for it's license file. If one is not found, it prompts the user to create one. The app then queries hardware specific stuff like processor, motherboard, NIC, and generates an encrypted data string that is then sent to your application license server which in turn generates a key that is saved as a file or registry key that the app then references to determine if it is executing on a licensed machine.
I have never seen any way for Windows to execute an encrypted application. It would have to be decrypted first. And if it can be decrypted then it can be copied.
Your question about "platform independent" is just too open ended to answer. Are you looking for a solution that works on Windows, Android, iPhone and Linux??? You'll need to be more specific about that question.