Okay, first thing is first. I didn't discover this, someone named Nintendo Unity did. Now onto what happens:
I'm really sure if this classifies as a glitch, but apparently if you trade/spawn in a pokemon with snow warning in Sword/Shield, the first legendary encounter at the beginning of the game can actually be fainted, despite normally being immune to damage. It will only give 1 or 2 EXP however. (probably level 0, despite the ??? that appears?)
It's an oversight, at least.
EDIT: It seems that abilities are overlooked entirely by the script, some people have claimed that imposter ditto may allow you to see the legends moveset, if it has one at all, though I'm unsure.Discovered by Nintendo Unity:
(I'm sorry for posting this, please be gentle. Just thought you guys would be interested in this since other scripted events in the game do similar things- I'll delete this post if you want.)