I am still using my Nexus 5 for this reason. I bought a Huawei phone last week, and discovered that they stopped releasing bootloader unlock codes a month prior. So I returned it and got a Sony XA2 ! Sony is surprisingly good in this domain with an online unlock app and even raw AOSP builds from the manufacturer! I had my new phone running lineage within a few hours.
OnePlus and Google still honor warranties on unlocked devices so I've been sticking with them, but may hop over to Xiaomi due to the high prices of newer OnePlus and Google devices next time - if only they had one with a 3.5mm jack and NFC this would be a no-brainer. Still running my OnePlus one nearly 4 years in...