If the war continues Ukraine will cease to exist in a few years, those are facts no matter what you think or believe, the Ukranians will exhaust their manpower which is already exhausted while Russia will not, its basic math.
And yes, Putin will not attack a country if it means war with NATO...