I am only a user, not an expert; I will try to answer. It is great you are so interested in GrapheneOS.
The Pixel 5a (and 5) are built with almost identical Qualcomm chipsets using closed source Qualcomm firmware. It is likely that Google is no longer paying Qualcomm to provide security patches for the firmware of the 4a and 5. From Aug 2024, it looks like the 5a will also be out of support from Google/Qualcomm. GrapheneOS only has limited resources (money) and they must focus their efforts carefully. I don't think we can expect GrapheneOS to commit to a promise for how long the extended support will be provided.
If you can find a cheap one, then a Pixel 6 will be a much better choice because it is using the more recent Google Tensor chipset.
I am only guessing, but I think it is unlikely Google or GrapheneOS will move the Pixel 5/5a to Android/AOSP 15.
If you are just planning to obtain a very cheap Pixel 'for the laboratory' to learn about GrapheneOS - then a Pixel 4a, 5 or 5a at least gives you Android 14. There is limited difference between 13 and 14 in the way GrapheneOS works - so if it is just an 'experiment' to get experience of GrapheneOS, and you understand there will be no firmware or driver security updates, then a very,very cheap 4 or 4a might still be a way for you to try out GrapheneOS. But, these will NOT be secure phones, just laboratory tools for education.