Regardless of the costs incurred, wars don't always produce satisfactory outcomes for the participants. For all the men and material the Russians have expended, this is not the result they sought.
Historically Russia has won wars through senseless attrition. Hoping they eventually pack up and go home is not a great strategy. Some have argued that the war should be fought until the Putin regime collapses. More likely, the Ukraine collapses politically and/or a terrible escalation is triggered.
Considering that the Ukraine survives with most of its 2022 territory and that NATO was not drawn into the conflict, that could be considered an acceptable outcome.
It's easy to be idealistic standing 5,000 miles away from a war.