The fact that this is a discussion should prove Fed’s GOATness, and this is coming from a Djokovic fan.
Federer has losing head to heads against both but if you think about it, Federer had to play them when they were at their peaks. Did Nadal and Djokovic ever play peak Federer? No. Nadal did occasionally and people like to use that argument that Nadal was leading the h2h even before 2009. But Federer is known for turning around **** poor head to heads against opponents once he figures them out (ie Hewitt and Nalbandian). If Federer had played Nadal more during his peak or they were in the same generation, I believe Federer would’ve figured Nadal out and turned the head to head around. As proven in their latest meetings, Federer figured Nadal out and continuously dismantled him. Nadal at RG is a different beast entirely, Djokovic didn’t manage anything against Nadal there either.
As for Djokovic, he never played Federer during his peak years, yet he was still behind in the h2h till 2016.
Obviously Federer’s age is catching up to him and he won’t be able to produce staggeringly good results and dominance that he did back in 2004-2007. But the fact remains that Federer still competed with his greatest rivals when they were peaking and he was regressing. When Sampras was just 30, he was being pushed out by his younger rivals (like Federer), but nobody seems to mention that. Federer staying at the top of his physical form and still competing at the age of 38 shows he’s the GOAT.