It's hard to see Putin ever choosing (under pressure) to end the war unless he can at least claim some sort of victory, such as territory gained, although never say never. The Soviet Union eventually just accepted their loss in Afghanistan and withdrew, although it took new leadership to do that. For that to be politically possible probably requires the war to become felt even more at home in Russia, and become more unpopular, which seems to be slowly happening already, even before more advanced missile systems become available to Ukraine.