If this is truly about NATO expansion, then let Putin withdraw from Ukraine in return for a treaty of Ukrainian neutrality. He won’t because NATO expansion is just a fig leave for his actual intention of returning Ukraine to Russian control. Putin, like many Russians, will not accept the notion of Ukrainian independence. He has publicly stated such many times. He even mentioned it in his speech on the eve of the invasion. He invaded not because of NATO, but because he thought that he could get away with it under a weak Biden.
He did exactly what you said! He withdrew his forces from Kiev and the greater part of Ukraine because he was told that Ukraine did not want to negotiate with a gun to its head. They went to Istanbul to have peace talks and a treaty, but that was ruined by Boris Johnson, who came in and told Zelinsky to go to war. Boris was there as a representative of the west.