I doubt the YF-22 would've been that much better, and it probably wouldn't be any cheaper. Cost overruns are inevitable with American Defense contractors.
Pft. All I remember is the "Fifth Generation" talk coming back to bite the US aircraft makers. Basically, the Russians threw a ridiculous amount effort into getting the MiG-35 (OC: OTL MiG 1.42/44) into production, and then advertised it to customers around the world as being a cheaper "Fifth-Gen" fighter. And it worked. The investment paid off, and the newcomers to capitalism beat the military-industrial complex at its own game-over a thousand of them have been built.
Well, yeah. That's easy considering that the MiG-35 and the Su-35 are both cheap and primitive compared to the F-23 (which is banned from exportation,) or the Dassault Rafale, which is the best selling western fighter of this generation (with six hundred on order between the various export buyers, plus the three hundred for France.)
The MiG-35's advantage is that it's a solid airsuperiority fighter, and a decent interceptor, while being fairly cheap. That said, it's pretty overhyped given that Russia only bought enough to replace the third generation fighters and early Su-27s then in service with the VVS, while buying the MiG-31M, Su-30SM, Su-35 and Su-34 in much larger numbers.
Hell, the MiG-35 was eliminated in the first round of competition for India's latest fighter competition, and then bought more Rafales
than France. This when India is Russia's closest ally and usual development partner, and essentially paid for the entire development cycle of the Su-30SM (and the HAL produced Su-30MKI, with it's absurd electronics fit.)