Pixel 7a here. I'm going to keep it either until it breaks or until the guaranteed updates stop, whichever comes first. So if I'm lucky and this lasts until 2028 I don't think the new phone I'd buy is going to be a Pixel 8 😁 but it will likely be another Pixel.
I do hope that in a few years Pixels will have replaceable batteries (especially as the EU is requiring smartphones to have replaceable batteries by 2027), that will make me stick even longer with them!