Chosen Solution

I have an iPhone X with a camera focusing issue. The problem likely appeared after a water incident (heavy rain). Simply put: The camera does not focus in 1x modeThe camera sometimes focuses in 2x modeThe camera focuses well in the portrait mode I did all the standard set of software checks (reboot, upgrade, restore, etc.) I replaced the camera module with a spare part. The problem still persists. Now, I am struggling to decide what to do next. Is there a chance the replacement part is defective? Or some other mechanism (responsible for focusing) is damaged and lens replacement won’t help at all. Need some community wisdom

Camera will focus the closest thing to it, if the outside glass has dirt will focus it, if you already replace it make sure that everything is clean. If a cleaning job does not fix your problem can be a micro-soldering repair.