I think it’s because the Raptors are just too advanced. They would beat out F-35’s pretty easily with their superior speed, climb, and stealth.
However it’s pointless to keep making them since adversaries aren’t close to competing with it yet and the next best thing is the F-35 which is far cheaper to produce.
I’ve heard F-22 can do things even many of the pilots of them aren’t necessarily aware of as their training is reduced to omit certain highly classified aspects.