NATO won’t wait for an “agreement” between Ukraine and Russia. That would give Putin veto power and such an agreement is unlikely to occur for decades or at least until Putin is out of power. Ukraine won’t even talk to Russia again until Putin is out of power.
NATO has an incentive to make recurrence of the war unlikely so that refugees can return and they can stop war funding and start funding reconstruction. Acceptance into NATO does that. Pandering to Russia’s preference resulted in war.
NATO likely will and should insist at a minimum on a commitment and plan to restore democratic norms. There may be a need to continue some aspects of martial law especially in the territories Russia occupied during reconstruction. But Ukraine could be admitted by NATO prior to full restoration of democratic norms. Perhaps with continued membership contingent on adhering to a reasonable plan.
You will never get every NATO to agree to Ukrainian membership as long as war can restart at any moment.
But yes, that can't happen until after Putin is gone.
Was never on the table nor will it ever be.