Roger Federer is arguably the greatest tennis player of all-time. He's spent 310 weeks at #1 in the ATP world rankings, including 237 consecutive weeks; both are all-time records. He has 20 Grand Slam titles, also the all-time record.
But he also has a strange hole in his resume; he has a losing record to two other players who have had their primes overlap with his: 22-26 vs Djokovic and 16-24 vs Nadal.
So can you be the GOAT, yet have 2 players be strictly better than you head-to-head?
This pattern holds up when you look at the matches that matter most: in both Grand Slams and finals, Federer does worse:
You see this kind of intransitive property all the time in sports, especially in college football and college basketball. But tennis is an individual sport, so any variance in performance should theoretically be explained by that player, as opposed to a collection of players on a team.
But tennis does have one significant variable: the surface that the tournament is played on.
Federer is 37 and has been a pro for 21 years, Nadal: 33 and 18, Djokovic: 32 and 16. So it might just be too early to tell. Each player's career isn't over yet, so all I can do is present this information without offering a conclusion.
To answer the overall "GOAT" question, I think you have to consider the overall body of work first and foremost. But that's an opinion - I don't really have a data-driven answer from the above evidence.