Jefferson Davis believed to the very end that the effort was not moot and he was the person in charge. His Vice-President Alex Stephens deemed him 'demented' but the armies reported to and were responsible to Davis.Just curious
There were increasing numbers of desertions from the Confederate Army toward the end of the war as common soldiers realized the cause was lost and their families at home needed them to return home but the common soldier was not in charge - President Davis was.
General Patrick Clebourne for one believed the cause was lost and wrote to that effect in 1864 but his opinion did not sway events and he elected to serve the cause to his death as did many others. Lee came to believe it was near to futile as he had no food to feed his army but he thought it wrong to surrender his army in the field and so leave the South without any way to negotiate a truce. The hope had become and remained that the North would still agree to terms rather than surrender the army.
There were outreaches made by the South to talk terms but Lincoln's answer was always to refuse such suggestions and his generals were told the same - not to negotiate.
It's happened many times in history that a country or an army does not capitulate even when they recognize their cause is lost. For some, possibly many, it's a question of honor and duty to the cause even if lost.