You're making the assumptions that 1. all combat roles should be filled by stealth fighters and 2. highly up-graded 4th generation fighters cannot meaningfully contribute to a fight in which an adversary uses stealth aircraft.
1. stealth fighters are greatly limited in carrying capacity (at least in stealth configuration) so if you need a jet to haul and launch a huge anti-shipping missile without being an absolute sitting duck should anything go wrong, a heavily upgraded 4th generation fighter with great maneuverability, range, and payload and a powerful radar is perfect. Using H-6 would almost guarantee that you'd lose it if an enemy fighter got on it and using J-20 would be pointlessly expensive since it'd have to carry the missile externally and lose stealth.
2. Technologies for making it easier to track stealth fighters are rapidly evolving. A 4th generation fighter with excellent aerodynamic performance, highly modern AESA radar, and IRST, data-linked with other similar fighters, allied stealth fighters, and a powerful AWAC can give enemy stealth fighters, especially lower-end or budget stealth fighters, a big run for their money.
Well, if you are the throttle jockey, the best chance you have of going home on the horse you rode in on, is 5 gen, while there is a lot of work ongoing to find, track, and shoot 5 gens, that's still a tall order, granted a loaded 4.5 gen like the Su-35 will be much better than the alternatives, and the Flanker remains a very capable aircraft for many different missions? and any up close ride out an check em out, where you go eyeball to eyeball with your bogey, well, you better have your finger on the trigger, because no doubt your bogey has a very fine Mk-1 cannon on that Flanker? that ain't nuthin you want to mess with??