Arguably the greatest challenge to contemporary writers is coming up with a way to make an ending both surprising and plausible.
Game of Thrones failed spectacularly in this respect, and Star Wars did the same. I think the first big whiff was The Matrix, but plenty of shows start with a bang and end with a whimper.
Of course, sometimes life imitates art, and while this blog generally avoids the pointless churn of political commentary, certainly the last chapter of American involvement in Afghanistan was entirely unexpected.
On the other hand, historians tend to look at wars as wholly contained narratives. War was declared on this date and ended on the other date, and anything beyond those bookends is beyond the scope of most conventional books.
Sometimes one has to look outside those confines, because in real life, the end of one story necessarily leads to another. The characters change, the plot lines switch around, but the tale never ends.
J.R.R. Tolkien brought this up in Lord of the Rings, at one point having Sam Gamgee reflect that the stories told of the Elder Days in the Last Homely House had continued down to the present day and that he and Frodo were part of the same plot line that ran back to Beren and Luthien.
And so it is. As Tolkien also noted in his timeless work, victories and defeats are at best transitory. Time passes and new challenges emerge.
What is surprising to people at the time will likely seem a foregone conclusion to future generations.
All one can do in such circumstances is do what any solid character would do: muddle through and carry on as best as possible. It may not be satisfying drama, but then again the story isn't finished and in real life, the actors rarely get to see the final result of their effort.