What happens on the front lines doesn't matter if you give your enemy a safe haven to operate from. In Vietnam it was Cambodia/Laos, in Afghanistan it was the Pakistan tribal areas. Ukraine doesn't even need to depend on Poland, the entire of west Ukraine is a safe haven for them.
I think the Russians will eventually learn from their mistakes so it's fine. Just so long as they don't sign a peace treaty or make any kind of deal with the Ukrainians. They need to keep the war going as long as it takes to achieve their objectives. If the war takes 4 years and ends in Ukraine being reabsorbed by Russia, in 100 years no one will care how badly the war started off.
That’s like saying a thief will eventually learn from his mistakes after his hand got cut off as a punishment.