My take on Lugia is that all speculation or anomalies about being "only" intended for the movies aside, it's a Gen 2 Pokemon. We have had mons show up ahead of the release of their "proper" generation in the anime, and then through in-game cameos (Gen 3 had quite a few like Bonsly, Munchlax, and Lucario), Togepi being a famous case as well for Gen 1.
Putting aside the game/gen in which the debut proper was, my metric is usually what generation was reasonably in concept development when this Pokemon would be as well. Most of these sneak-preview Mons like Togepi, Snubbull, Marill, Lugia, etc. showed up first in one Generation's games, but it was after those generations had come out, meaning they had long since "finalized" their regional Dex and any new Pokemon were probably being saved for a distinct release now. Lugia is a Gen 2 Pokemon because Gen 2 was the first generation where its inclusion as a functional Pokemon the player could catch or interact with would be.
We have had anomalies on this front but very rarely do they happen in that generational gap anyway. Mew was a secret even from the Development team, but I'm inclined to believe this simply refers to Mew as a Pokemon they show off directly rather than the concept of it, given the entire concept of Mewtwo necessitates a Mew. If Mew hadn't been a development gag, my guess is it would have shown up in a later Gen in a manner similar to Regigigas debuting after the Regi trio and being designed to slot into some of their lore statements.
The others that throw a wrench into this idea of mine are the Ultra Beasts from USUM and Meltan/Melmetal, but the UB's as a concept aren't strictly conventional Pokemon, so I kind of take the lazy answer by saying that's just one more oddity on the pile for them. Meltan and Melmetal are the exception since they are fully playable in Let's Go with most all the code conventions and trappings needed to work as a full Pokemon, they simply are not among the data in the other Gen 7 entries. In an odd sense they kind of hearken back to RBY Mew in that they're fully coded but do not appear in the game without some external influence (in this case transfer from Go).
I'll throw in an explicit "I like that" for Meltan in LGPE as closing, since I find it a cool way to have a Mew throwback without the usual obnoxious availability of Mythicals. Since Go is a F2P game, the Box works with HOME as well as LGPE, and the frequency is kept to a wait that's long but not too obnoxious so that (combined with the candy mechanics) Melmetal will still be available-but-scarce in the main games over time