Pre-Gen 7 games seem to be fine with that.
Since game specific events seems to use the same event flag, swapping doesn't *appear* to do anything serious.
That all changed with Gen 7.
Game events have separate flags, and swapping versions can cause a soft lock.
SWSH is worse; game exclusive Gyms, and gym leader triggers (for their dialogue), and exclusive overworld Pokemon, can cause the game to crash and perform other weird oddities.
Until you're in the post game, I would recommend not doing that for newer games.
For all games, you *can* do it, but at your own risk :3