Hello mmpod,
I understand that you are having an issue with your screen not locking while on a call. You’re in the right place to find a resolution.
First, I'd like to make sure that you don't have any cases or accessories, like a screen protector that might be covering up the proximity sensor on your iPhone. This is located near the top of the screen in the middle. These could cause it not to work properly when holding the phone up to your face in a call.
If you're still having issues after checking your accessories, then I recommend to reinstall iOS on your iPhone to help narrow down the issue. This should not affect any of your data, but it is always a best practice to make sure you have a current backup in either iTunes or iCloud. How to back up your iPhone, iPad, and iPod touch
Once you have a current backup, follow the steps in the section titled "If your device turns on but gets stuck during start up" from the following article. These steps will reinstall iOS. Keep in mind that these steps were written for a different issue, but they will still help isolate the situation further. If your iPhone, iPad, or iPod touch won't turn on or is frozen
Have a great day!