USAF only wanted to retire 33 training variants because of the rising maintenance cost but Congress blocked it.They have 20 years of technology gap in between. F-22 being better than F-35 is against the nature of technology. If F-22 is better than the F-35, the USA should keep it for itself. But, they want to retire it, meaning that the USA doesn't even want to keep it for itself.
F-22 has a reputation for being the most advanced fighter, and this reputation is also its doom. They probably intentionally put F-35 behind F-22 in order to prevent it from the same doom. If they openly agree that F-35 is better than the F-22, there would be some congressmen who try to block its sales and eventually succeed, just like they did in the F-22.
When it comes multirole capability f35 is has the upper hand. But when comes to air superiority nothing can beat f22.
This has been said in many interview by experienced USAF pilots ( some of them flew both jet )
And why not?
it has better stealth, better manuverability, better speed, bigger radar, almost similar ew suite. More and longer range weapons.