This is what Pokémon Go has been doing for years, it's a huge pain to try to build any layers on top of the platform because Scopely takes every measure to prevent that from happening
An unintended consequence of fucking everything getting reverse engineered by AI right now has me convinced that cloud gaming is about to become the norm. Not letting the user touch the machine code at all will be the only way to protect against this.