If the carrier is far enough away that neither side can reach the other, then there's no battle. You can send a few missiles, but you can't sustain enough of a barrage know the other side is out of commission.
But if the Chinese fighters have greater range, then there's a time where the Chinese can operate freely from their base - nobody can hit them - yet the carrier is in range. That's the time when the J-20 having greater range is a strategic advantage. Let them get too close and then your greater range doesn't really help (except that you can loiter for longer, as you mentioned).
As I said earlier, the fact that the F-22 doesn't actually fly off a carrier doesn't matter so much - the carrier group can provide cover for tankers, thus extending the effective range of the F-22. And of course they can launch their own F-35s.