I've been dealing with the same issue. Unfortunately, as far as I know, there is no way to avoid it without hacking the game in some way (
Actually, I've just recently discussed this issue with Yahil, and they suggested quite an easy solution that they've used in their recent game: https://itch.io/t/3480251/pokemon-ant-war-game#post-9365418