ParasNath Is it happening to only you or everyone who’s wearing that particular set of earphones? Give it to someone and check if the in ear detection is working perfectly on them or not.
I have experienced the same issue, most of the time my left earbud detects that I’m not wearing it. So, I bought another earphones (other brand) and it has the same issue, then I realised that the problem is not with earphones but my ear canal structure. Now I wear the left one slightly tilted and it’s working fine.