Hi, I'm facing the same issue several times. And when it flips it doesn't take a picture. I have to reflip it and try again. It's strange. Other issue is when is mounted on the car dashboard on the horizontal it does not flip back entirely when engaged on the selfie mode. Got the original case and before it was not interfering, this issue started only a few weeks ago.
@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.