Setting up APN relocks my phone

Every time I try to set up an APN so I can get mobile data my phone will reset and relock my phone to the sprint network, then I have to stick my Sprint SIM back in and unlock it after waiting some time. Then I'm back to square one. Any suggestions?