Versuch es mal ohne das Front Kamera/Sensor Flexkabel angeschlossen. Ich meine mal ein ähnliches Phänomen bei den "älteren" Geräten gehabt zu haben. (iP 8 und abwärts)
If Chris' solution won't work you will need to replace the front flex assembly. If this is not fixing the problem it is behind that, beginning with the connector on the logicboard. Something like big pieces of dust will already reduce proper connection. Is the brightness sensor or the approximation sensor working?