Is there such a thing as the perfect ending to any story?
The only reason I’m not sure about this is because all writers are human and we’re all fallible.
No perfect writer = no perfect writing.
I know, looking back on my older stories, I can see ways of improving them thanks to things I’ve learned about writing craft and technique since that time. BUT you can improve on what you do.
I can look back at those stories and know they were the best I could do at that time. So am reasonably pleased with them but am more pleased with improvements I have made since that time. Writing is always a case of developing your craft, I think.
For stories by other writers, what I look for is an appropriate ending for their characters’ stories. Yes, sometimes that ending can be ambiguous.
(After all, tomorrow is another day from Gone With The Wind is a good example of that kind of ending). But it should be appropriate to all that has come before and as long as it has done that, I’m happy.