You can't turn off the proximity sensor on your iPhone, but if it's malfunctioning, try force-restarting your iPhone and ...
You can test your webcam using online tools or programs that come with Windows 10 or your Mac computer.
Results that may be inaccessible to you are currently showing.
Hide inaccessible results