@pwnkmr1802 as ColorSage said, could be dirty/covered proximity sensor.
@Vêner Does it flip all the way? Does it seam to flip att normal or reduced speed? Is this behavior with our camera app?
If the phone is exposed to small vibrations during flipping, it might flip slower (more controlled) but it should still flip all the way unless it feels/believes that it could damage the camera if it continues. You shouldn't flip and drive
😉It could be that there is something mechanically wrong. Best way to find out is to reset your phone. If it doesn't help, then you need to send it for service.