Lugia, regardless of ability, is obviously banned in most formats, and on the rare occasions that VGC formats allow it, they will usually a say a team can have no more than one or two designated "restricted Pokemon" (a.k.a. "ubers"), so using it on your team will count against that limit.
The power level in the Ubers format is considerably higher so that Lugia can be overcome by enough of the allowable Pokemon that it's not an issue at all. Then there's AG, in which the whole point of the format is that everything that's allowed in-game in a random PVP battle with no prior arrangements is also allowed there (hence Anything Goes), so nothing ever gets banned from AG except when a new game comes out and certain Pokemon don't even exist there.