When using the camera in portrait mode on the iPhone X (iOS 11.3.1), no matter where I tap to focus it always ends up focusing on the closest object and blurs everything behind it. I've tried on 3 different iPhone X and had the same issue. However, the 8 Plus handles this fine where I can focus on an object a little further behind and it blurs the foreground nicely.