Best way to unlock iPhone now that T-Mobile has the new EIP rule

Hi, I travel to Canada quite often and has been relying on the monthly data that T-mobile provides. However I kept on getting message saying I've been using a lot of data abroad and they may disconnect my line. I can get me a Canadian sim but my phone is locked. Anyways to unlock the phone's second sim slot but still keeping the hardware upgrades credit?

TIA