As strange as it may seem, Samsung recommends a "gentle tap to the back" or "a small shake" of their Galaxy S8 to those who complain that their phone's main camera is taking blurry photos and has problems focusing.
https://www.notebookcheck.net/Shake-your-Samsung-Galaxy-S8-to-help-its-camera-focus-properly.267446.0.html
Yes, Lumia 950/XL is still the best mobile camera.
My Galaxy Note 4 had an identical problem. At first a light shake or tap was enough to fix it, but it required far more aggressive (think several seconds) shakes after a while. Made taking video terrible because the camera made a noise while trying to focus
:) :D thank you so much although this article is quite old, I still own a Samsung s8 phone and the advice to gently tap the phone fixed my blurry camera straight away! I am so appreciative of the advice! I was thinking I need to live with a failed camera, pay to replace the camera or get a new phone, now I dont! Thank you so much!