Frankly, a "victory" for either side would be pyrrhic and wrought with harsh, long-term consequences. Ukraine will struggle to recuperate its severe losses, and will be open to another attack by Russia. Joining NATO would certainly mitigate this problem, but losing so many people to war never has good effects on a society. Russia would face similar, but less severe, consequences from its own losses, and would also struggle with occupation; not just in whatever territories it annexes (likely those it already declared it has) but in more tumultuous home regions as well.
In any case, any of these problems would be made considerably worse by their mutual issues of corruption and autocracy.