First of all, please make sure that nothing is covering the proximity sensor which is shown as #13 in the image below:
Since there is no way to disable the proximity sensor in your settings, and assuming it is not covered by a case, etc., then it must be defective.
Yes, there is a workaround you could tap thepower button to shut the screen off during a call but you should
not have to resort to a workaround.
Tmobile will exchange your phone under warranty if you are outside of the buyer's remorse period. If you are within the buyer's remorse period, even better.
Typically, the way the proximity sensor is supposed to work is as follows:
1) You place or receive a call and use your handset.
2) As you move your phone to within approximately an inch of your face the screen shuts off.
3) If during the call you need to look at the screen for whatever reason you remove the handset from your ear and the screen should come back on.
If your phone is not operating like this and you have nothing covering the proximity sensor then I would suggest you have Tmobile replace the defective phone.