The Gun was overrated even in Vietnam, most of the kills were with missiles and most of the Gun kills were early in the war.
The last Gun kill between fighters occurred more then 40 years ago. Missile technology have evolved since the Vietnam war.
But to answer your dilemma if the J-20 merge with an F35 and both were somehow alone it would be a fight over who gets their Fox 2 of quickest. And if both run out of missiles the J-20 can always outrun Fat Amy..
The rules of engagement had a major impact on US kill rates in Vietnam since they can’t shoot unless target has been visually identified.
Modern aircraft cannon has enough ammo for one target. It is better than nothing, but not by much.