In iOS 18, Apple has added a new property on AVCaptureDevice called displayVideoZoomFactorMultiplier which serves exactly this purpose! We can finally stop hardcoding these magic factors... or at least phase them out until we can make iOS 18+ as the minimum deployment target.