welcome to genvibe
If I look for a fuel pump tank seal for an base 05 Matrix, parts.toyota.com comes up with
https://parts.toyota.com/p/Toyota_2005_ ... 33020.html part number 7716933020, which it says fits 03-06 Matrix.
If I look up 77169-02050
https://parts.toyota.com/p/62960053/77169-02050.html says that one fits 04-13 Matrix
Not sure what the difference between the two are. At some point between the early and later years, they switched from a metal to a plastic gas tank (at least in Vibes) In
viewtopic.php?p=534019 MiJaWi describes the challenges he ran into swapping in a plastic tank to replace a metal one. Perhaps, and just conjecture, is that one of the seals is for the metal tank, and the other is for the plastic tank. But as I said, that's just a guess.
Sorry I can't offer a definitive answer