I had unlock my AT&T locked iPhone XR before I could use the esim with another provider. I did the unlock through the AT&T unlock web page and then I had to do a phone reset and restore before the esim was unlocked. The esim only gets unlocked during phone activation which was triggered by the reset/restore step.