This can vary by the individual math department and student concerned.
The HS classmates who pursued math PhDs(Pure and Applied) in top 8-10 programs didn’t need to repeat any of the graduate math classes they took as undergrads. Instead, they were allowed to continue onto more advanced topics and sometimes even given credit towards their PhD coursework requirements.