Same as now: the person who transfers loses their name in the rankings while the other four keep it.
What they really need to fix is cross-realm groups for Challenge Mode ladders. Right now 4 players from server A can carry one player from server B to a gold medal time, and if the time is good enough it will earn the title on server B even though only one person from the realm was in that group. If that person then transfers then the ranking is held by 4 people who were never on that server.
I like cross-server groups for many things, but if they want to make this fair realm-based competition, which realm based times/titles are, it should have a minimum of four people from that same server to qualify for server-best rankings. Plus it also stops groups from selling feats of strength/titles on other realms.