I believe The Beatles: Rock Band came the closest to being perfect. Eveything about that game was just beautifully done and the only things missing was Pro Drums, an option for Keys, and a few more Beatle songs (Hey Jude, Strawberry Fields Forever, Yesterday etc. etc.)
It’s not Portal 1 or 2. I’m sure of this because I and others think Portal is possibly the best example of a perfect game and lots of other people say it was good but Portal 2 was a perfected version (and the opposite is also true, I think Portal 2 is good but lost a lot of what was wonderful about Portal.)
My point being, it’s so commonly contentious about which of the two was perfect and which one was merely good but not quite to the standards of the other that it must be that either is only subjectively a perfect game. Though, in fairness, possibly there are no objectively perfect games, but in that case the question really just comes down to “what games do you think are good?”