The only reason Russia is invading Ukraine is because they feel threatened by the USA and NATO and they need a buffer for their own defense. If USA left NATO and especially if Russia joined after that then Russia would not feel the need to secure a buffer between NATO and Russia.
China probably would not feel as threatened either if the USA were not as involved in Asia as it is currently. I think the world could actually reach a new level of peace if President Trump would withdraw the USA from NATO and isolate the USA from world politics.
Putin has also stated in the past that he doesn’t want war with Ukraine. Trump had his chance to pull the U.S from NATO and he didn’t.
He’s setting the chess board - his third term - it’s gone.