Unlocked iPhone replacement
Locking has to do with the device itself, not your SIM card or cellular account. So you would need to have the new device unlocked as well. Assuming, though, that you qualified to have the initial device unlocked (per whatever terms and conditions your carrier specifies), you would presumably be able to have the new one unlocked without any problem.