How do you know China has better sensors than US? Was any kind of benchmarking done between sensors from both countries? If we compare sensors developed for commercial applications, then China is years behind US.
Because, unlike civilians, the military have deeper pockets and skip generations.
The F-22 uses a radar developed in the 90s, the J-20 uses a radar developed in the 2010s. Radar generation is every 5 years. So the J-20 uses technologies from 3 or 4 generations after the F-22's radar was developed. The F-22 uses an old radar because its development stalled.
Also, civilian tech introduction is based on affordability relative to the market, whereas the military doesn't make their primary equipment at competitive rates for the market. It's all about technology and affordability that's relative to their pockets. I told you this long ago, militaries function like rich people.
To make it simpler, you look at the iPhone tech available and judge that a $1000 phone is what's affordable in the market, and you make technology based on that. Simply put, affordability is the criteria. Otoh, the military's like, "I can afford a $10,000 phone. So what experimental tech do you have that I can introduce in small numbers for $10,000? And I can accept a cost overrun up to $15,000". We shouldn't associate rich people problems with run-of-the-mill people like civilians.
So the J-20 uses technologies that are current gen from the perspective of the lab's peak capabilities, not the cheap stuff that's out in the civilian markets. Civilian market is at 5nm today, but labs are at 1nm. What's in the lab today is what gets put on the jet.
The F-22 came with a Gen 1 radar (est 250Km vs 1m2), then I believe the F-35 skipped a gen and got a Gen 3. Then the Americans made a Gen 4 (est 400Km vs 1m2), which was not funded, great job there. Dunno about Gen 4, but I think the first 3 gens are analog. Then came digital radars, perhaps Uttam Mk1 is one. Uttam Mk1 and Mk2 appear to be 2 generations apart, then there's Uttam Mk4, which is GaN. So, in India, we have GaN ready for testing today, or 3 generations of radars being developed simultaneously. So why can't the Chinese have GaN already operational on the J-20? That would be the worst case for everybody. Even if it's not, they are probably 4-5 generations ahead compared to the F-22 using GaAs already.
What's really bad (or good) about the Chinese is the things the West is doing over 10-15 years, they are doing it in 5. They are using money power to achieve it. The J-10A came out in 2009 with a standard MS radar, then came the J-10B in 2012 with a PESA followed by a J-10C in 2016 with AESA. Now we are in 2023, so you can imaging where they are by now. It's experimental technologies that matter, not the technologies lame-o civilians like us have access to on Amazon.
So, while the J-20 uses cutting edge technology of today, the F-22 is currently using technologies that were cutting edge 25 years ago. This is where the disparity arises.
The main consideration that drives the design of the primary ASF is the life and death of, not the pilot or the platform, but the country, and that determines how deep they can rummage in their pockets. The Chinese have the Americans beat in this area today.
Since superpowers don't export their peak level technologies, the only real world benchmark available is war.