It could be a bit of both. Not sure about RG and the USO, but for the AO and Wimbledon, if you look at the OP, sure Fed had some bum losses (Seppi 15 AO, Raonic 16 W, Stakhovsky 13 W) which there’s no way Djoker loses to, but he also had lots of really tough competition too - imo it’s questionable to assume Djoker gets out of stuff like 2012-2014 Nadal and Lendl Murray at the AO without a single loss
Then we get to the versions of Djoker himself who Fed faced, like pretty much peak Djoker at the AO in 2016 and 2 of his best grass versions in 2014-15. Since 2018, Djoker hasn’t faced anyone as good as his peak 2015 grass version at Wimbledon for example and I think even Djoker fans would agree those 2 versions >> anything since 2018, so he’d be hard pressed to come out of those matches with wins