F-22 is not a "perpetual prototype", you're probably thinking of the F-35. And F-22 is optimized for Beyond Visual Range (BVR) detection and destruction of their adversaries before those adversaries even know they're in combat, both via A2G smart bombs or A2A med-long range missiles. If that's the only kind of "combat-not-combat" it ever sees, it will have been worth it - less planes and pilots lost.
That said, it's also one of the best dogfighters in the world in case it ever comes to that, but that kind of combat will be deliberately rare.
That said, it's also one of the best dogfighters in the world in case it ever comes to that, but that kind of combat will be deliberately rare.