Its too expensive for the military to start up a F-22 line. And the tech has moved on since 1989 when the F-22 design began. The YF-23 was a better plane in many respects but lost the competition.
Agree from all that I have found the YF-23 was better than the YF-22 except Trust vectoring.
Technology is always moving on. That does not make the F-35 able to beat the F-22 in combat.
I guess the real question tho is how does the F-35 fair against the JU-20 and Su-57.
That is if the JU-20 and Su-57 are ever fielded in significant quantities.