Think Ukraine had its own airforce at the beginning, and for 30 years nobody stopped it from modernizing or acquiring new aircrafts.
Besides that, I doubt the US would have ever sold a single F35 to Ukraine just because of revealing radio-emission and reflection patterns to russian air defense, basically drawing F35 useless for future usage against Russia.