I just switched from my pixel 2 to a hand-me-down iPhone 11 Pro for exactly this reason. Initially I installed LineageOS on my Pixel 2 but then you can't relock the bootloader, leaving the device completely exposed in the case of a physical attack.
I was skeptical of the iOS transition but it was pretty easy and I will probably never go back.