Quoted By:
I don't know why people can't just recognize UBs as a third group, separated from legendaries and mythicals.
The game code has only two groups for these "special" pokemon: things banned from most competitions and battle tower clones (legendaries) and things that are not banned (sub-legendaries)
So in the same way official sources separate the ones coded as "legendaries" into legendaries (banned) and mythicals, the second group in the code, labeled "sub-legendary", is actually legendaries (not banned) and UBs
tl;dr
According to the game code: Legendaries and Sub-legendaries
Officially: Legendaries, Mythicals and Ultra Beasts