You need to get your T-mobile One+7Pro sim unlock 1st.
More info here:
Yes, you can try it that way. If the device is already fully paid off you can also simply contact Tmobile and they will be able to sim unlock it for you already as well, or if you haven't paid off and want to chance it, you can try contacting them on twitter or through the tmobile app and try to get the customer service rep to unlock it. Though if you haven't paid it off it's probably easier and faster to DM the OP from that thread.
Kind of related. I converted my t mobile oneplus 7 pro to the international version and am eligible for a sim unlock. I tried to do it over chat but they said since it's not their version of android I would have to do a factory reset (which wouldn't convert it back to t-mobile stock) in order to sim unlock it, does anyone know how to sim unlock it on the international version with t-mobiles help. I would have thought t-mobile could just do it on their end but I guess not, and I guess they are kind of idiots over there to, because initially they had no idea what i meant when i said i converted it to the international version (heck they still didn't understand that I changed the firmware/ROM) so resetting it wouldn't make it a t-mobile phone again.
Do a search for this "The T-Mobile OnePlus 7 Pro’s bootloader can be unlocked by flashing Android Q" and fallow the instructions. Instruction are on xda.
There is no need to unlock the sim on the T-Mobile phone to unlock the bootloader.
Phone needs to be on the international firmware. This can be done with the patched msm tool. Then downgrade to android development preview 3 using local upgrade on phone. Unlock via fastboot and finally root and install a working rom or do the rollback to android p via local upgrade. Search for the guide and fallow the instructions. It really simple.