Ukraine is now firmly in the EU-sphere now. If Ukraine push Russia back to the pre-2014 borders or makes a favorable peace-treaty with Russia, Europe will continue to prop-up and beg Ukraine on their knees to join the EU, and even if Ukraine cannot broker a peace deal they are happy with, they'll still be considered the first front-line against any Russian aggression in the future.
The biggest problem with most western countries is that there has not been real hardship experienced by the population since WWII. The peace-bubble Europe has been living in since made governments "peace-damaged" to the point that preparations and readiness went out the window decades ago, and very few understand what is needed. Finland and Poland being the exception, Sweden also, the rest seem to enjoy internal invoicing to fudge any so-called growth in spending, while the major powers in Europe for the most part cannot work together or decide who will do what. It's been 4.5 years and military buildup is still glacial.
Necessity is the mother of invention, and Ukraine lives this every day. Europe is still flailing having had years to do something but with very little to show for it except sternly worded letters. No matter what happens, Ukraine will be the big winner here in the long run.
What i do see if Russia fails in Ukraine is that they will go after Georgia instead - something to keep the war economy going.