Oh man what a topic. First and foremost, I would say the "perfect" game is VERY subjective. I mean, games these days are so varied from each other can you even compare them? Take a game like Baldur's Gate 3 with its (what feels like infinite) possible story and character combinations allows it to be pretty perfectly tailored to the player's experience, and then compare it to something like that first Five Night's at Freddy's. I would say both games are fantastic and I don't have any complaints for either but you can obviously tell that I haven't taken into consideration the scale of each game. The problem is that you can make a near perfectly executed smaller game, and as long as it excels in what it set out to do it will rival even bigger triple A titles.
I'm of the opinion that a perfect game should be one that takes advantage of every aspect of it's game design and narrative. For me, a game I like to look to for inspiration is Deltarune. That game masterfully blends the lines between the gameplay and the story. And both aspects are used interchangeably to further the experience. It's the type of experience that would be good as a standalone novel, and would be good in terms of it's gameplay alone. But specifically the way the creator merges aspects of the battle system with the thematic elements of the world, and how the encounters allow for in depth explorations of character really speak to me.
I personally believe that a game should have just as much plot as gameplay, of course I know many who would disagree and that's my take as a writer and coder. But even then I know someone who would be able to confidently defend a battle royal type or an open world exploration as 'the perfect game' and I can't argue that much because a lot of the deciding factors are opinions. For me a competitive experience isn't what I come to seek but I understand that it's similar in nature to sporting and that there's a high demand for those types of experiences.
TLDR: I think it's very very difficult to make or even conceive of a 'perfect' game because it's like trying to come up with a 'perfect' food or a 'perfect' human personality type. And My message to any readers is to not try and get lost on making a game perfect. As a developer your Magnum Opus will be perfect to you, because it's the combined effort of your experiences, biases, and passions. So while it is fun to propose ideas like I did earlier don't let it bring you down if your game isn't a cult following or held in high praise because out there lies a game for everyone.