Proximity sensor Works when making a phone call not when receiving!

i have an iPhone 6s which have Non-OEM LCD and OEM sensor and everything else and the phone’s proximity sensor works only when the phone in my hand and make a phone call but when the phone is in my pocket and pick it up to answer a call it doesn’t work so what’s the problem and this is the second sensor which i have replaced and i’m running iOS 12.1

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0