Best way to define a 5th gen Vs 5th gen in A2A is like two enemy snipers a kilometre apart, prone, hidden in foliage. Almost all the gears they've are pretty much same, similar scope, same bolt action rifle with maybe a very small difference in cartridge like one is 338 Lapua Magnum and other's 338 Norma Magnum but they've just a single 5 round magazine each because tbh they need just one.
There are n-number of factors that would decide who's going to kills whom and for most of times these are extremely minute. Like suddenly sunlight gets reflected from one's scope or say a birds starts panicking near one's position.
In rare cases there can be a single piece of tech that can completely change the balance of power like say only one of them has a thermal.
[A technical example in this case would be say a new radar that's in larger wavelength but still somehow manages to generate accurate targetting data]
Things completely flip when we start to think about an A2G scenario with 5th gen fighter. Now it's like a squad of highly trained SEAL type force, with all their gucci gears trying to attack a position held by say a company of regular soldiers.
They'd have a pretty high chance of completing their mission, they'd deal far more damage than typical infantry, would be hard to neutralize them but one thing's for sure to happen...they're going to lose a men or two from their squad. Because multiple positions are firing at them, there are 420 eyeballs looking for their movement in all directions and perhaps most importantly, a company of 120 men have way more ammunition and that too more varied compared to a single squad.
[A technical example in this case would be the term magazine depth, no matter how advanced a 5th gen fighter is it can never match the amount of missiles that can be carried on say five TELs]