Hmm... this actually doesn't sound too unrealistic. As far as I can remember, Rayquaza will be forced onto your team in the Delta Episode, giving you no choice but to swap out a team member.
Meanwhile, in a completely different game: The third and latest iteration of the Dark Souls series (fittingly called Dark Souls III) features a boss with a titanic amount of health and defense. Bringing him down is a lengthy test of endurance and skill, since being a Dark Souls boss, he can take you out in a few hits. That is, unless you pick up a special sword lying in his boss room. The unconventional sword nullifies the boss' defense and deals an enormous amount of damage, though it requires some... unconventional use.
This boss battle got some flak for being a scripted battle in an otherwise very flexible game series, but for many it worked well nonetheless. It is far from the only scripted battle in gaming history, but a good and recent example.
It could be that Game Freak wants to try out something similar. A climactic battle where the only way forward is the attack that cancels the opponent's Ability. You catch the cover legendary, it is forced onto your team, maybe even positioned in the first slot. The UB attacks, and none of your moves seem to affect it. But your trusty friend stands on the sideline shouting "Nothing seems to bite! Perhaps Solgaleo's Sunsteel Strike will harm it!" in bold and blue text. And then special cutscenes play and everything is epic, if not for the fact that the only way forward is to follow the script.
But, like the battle in Dark Souls III, other strategies can yield a win too. If you play patiently, conserve your items and use clever strategies, it is possible to hack the boss to death without ever picking up the special sword. The obvious path is pointed out clearly, but if you look for alternatives, they are there. Having Mold Breaker, or using Substitute cleverly, PP stalling until Struggle or other strategies might win too, creating an extra option for the savvy player even though the opponent might have titanic HP and Defense, no weaknesses, and an ability even Shedinja would envy.