It's not.
Ukraine see's the principle of what organisations it chooses to be a member of as only marginally behind it's territorial integrity on the list of its war - and societal - aims.
NATO and the EU both take the same view - that membership of either is a matter purely for the applicant and member states, and they are utterly solid in ensuring that that principle holds.
Additionally, as well as the genuinely serious principle of sovereignty involved, Ukraine is not going to agree to the same non-membership of NATO and the EU that didn't protect it from Russia in 2014 or 2022.
There is, I absolutely promise you, no one in either the Ukrainian government, or within NATO or the EU, who is saying that restrictions on membership are potentially on the table.