iPhone locked when calling with headphones
When you're on a call whilst wearing earphones the iPhone is designed to AutoLock, this happens with all iPhones not just yours. 

You can disable that feature from Settings➜Display&amp;Brightness and set it to never.