Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
It would work, but the game shouldn't be changing the player's options for them. You'd need to revert it to whatever it was previously once the battle is over.
It'd be simpler just to make the battle style Set by overriding it if a particular game switch is on. Find where the value of $PokemonSystem.battlestyle is used in battle, and add appropriate code.