Wharton went to Palace in the Feb for £18M and we spent £40M on Gray a few months later. Wharton is 3 years older. Only time will tell who will be better.
Players have agency.
So if he moves to a PL side and wants guaranteed playing time as a midfielder, that probably wasn't Spurs.
Gray at 18 happy to move to a Pl club with no guarantee of playing time - played a lot in his first season (but due to injuries to other players, not planned) mainly in a position (CB) that he's never played before. Would Wharton have been happy to play CB for Spurs ?