Carrick, just researched that and had to dig a little but found it was not alphabetically done. Newsweek explained it this way...
According to British newspaper The Telegraph, the leader of the U.S.—whoever they would have been at the time of the queen's death—would have been seated in the same fashion, with members of the royal family, past and present U.K. prime ministers, and Commonwealth leaders taking precedent.
With royal protocol dictating that Commonwealth leaders outrank those from other parts of the world at the Queen's funeral, it meant that Canada's Prime Minister Justin Trudeau was seated nine rows ahead of Biden.
https://www.newsweek.com/why-president-joe-biden-was-seated-far-behind-other-world-leaders-queen-elizabeth-funeral-1744377