But winning a war doesn't mean the defeated enemy will accept it
Iran basically won the war, but US doesn't want to accept it, at least not yet, and same for Russia- it has won the war because Ukraine is destroyed and cannot survive on its own and Ukraine's population is in permanent decline(so the state is not viable the longterm), but Ukraine hasn't accepted d the loss, at least not yet.
Same with US in Afghanistan - US probably knew the war was lost between 2010-2015, but it didn't accept it for many years, until it just had to. If US and Ukraine can't realistically find a way to win their current wars, they have lost,and no, they won't be able to hide that truth for much longer.