I think I found the root cause of the focusing issue.
After reading through all the post here I concluded it has to be an hardware problem, not wanting to wait for a long time and being without a phone I descided to open the phone and check the camera module for hardware issues. My first suspect was bad contacts but they all looked ok. After removing the camera sensor out of the module housing I noticed that the sticky foam used to mount the sensor in the housing was the real issue. The piece of foam has been misalligned and physically limiting the movemont of the camera lens causing the focus problems. Carefully removing it and alligning it how it should be fixed all my focus issues. Now my camera works like a charm.
So the good news here is, it’s easy to fix. To bad that a few cents of double sticking foam caused all these issues.