The author doesn't make clear whether Peyton Farquhar is dreaming that he escaped or if he really escaped, but there are hints. For example, I started to realize that the whole escape was a dream sequence when Farquhar was able to avoid being shot by all the soldiers who were aiming at him. He succeeded in swimming away, without being killed.
When Peyton Farquhar is running, and running, and running, trying to make it to the safe part of the state, to get home, he is tireless, he does not stop, after swimming, he is able to run, until finally he sees his wife, who looks totally, perfectly calm and happy to see him as if nothing is wrong.
Had Farquhar really escaped, his wife would not look so fresh and calm, she would have been more emotional and greeted him with passion and joy.
I knew it was all a dream and that he was about to die because all the events of the last moments of his life amount to a beautiful dream, and unattainable dream. Farquhar dies with the vision of his wife stamped in his memory forever.