Let me stop you right there. While what you've found hasn't been said before, this kind of thing (regarding gym leaders and exclusive content) to an extent has been around since SWSH.
For example, if your swap the save at certain times, you will see Zacian's model (above the Power Plant) in Pokemon Shield. You'll see the wrong gym leader in a different game (tho talking to them will crash the game, presumably cause the game tries to summon story text, but you're interacting with the wrong character), you can get the wrong t-shirt from Klara/Avery, etc etc.
Also, this is not a bug. It is only a bug if it occurs without some kind of modification somewhere along the process.
For example: if you were able to officially send SW saves into SH, then it is properly a bug (unintended behaviour using official intended methods).
Since you discovered it using unofficial behaviour, all I can say is you this behaviour did not have to be considered by the devs, since you used unintended methods.
Don't get me wrong: it is certainly something interesting, however you cannot claim this is a bug.
As per my point earlier, this was presumably done with some homebrew app on CFW, not via official methods.
Someone would have to do research for it. Nothing can be implemented without proper research and documentation. (and sadly, I doubt it'll occur)
However I suggest to not use doing that, especially if you intend to go online, as this is not legal.
Don't risk your save or your console bud