Although this discussion board shows a Microsoft logo, Microsoft Mobile did not leverage their Microsoft Answers for individual support. Why ever. Furthermore, Microsoft does not provide any individual support for mobile phones anymore since May 2016. This
board here is driven by a community of specialized 3rd-party enthusiasts. Some love to answer questions, some are being paid. If you are looking for an official answer, you have to contact a company called B2X.
To answer your original question: I am not aware of a software issue. All cases I know are hardware related, like a broken proximity sensor. Even if it worked in Windows Phone 8.1, the upgrade to Windows 10 Mobile revealed that issue in hardware. Before
you go for B2X, another reason could be dirt on the screen or a misaligned screen-protector – which blocks that sensor; remove that and clean the display. To avoid any scratches, please, go for distilled water
and not a microfiber but a woolen dustcloth.