I had several Xperias before switching to Pixel. It was the lack of updates that did it for me. Offer 7 years of updates in a repairable package and I'll buy an Xperia again. At this point the only two trains that look acceptable with their own pros and cons are Pixel and Fairphone.
Sony will do the bare minimum that they are forced to. So 5 years due to the EU. Repairability idk about that. Parts are hard to source outside of Asia for Xperia phones.