That’s a tricky use case, as your training data doesn’t fit the expected test data domain.
I assume that at least your test set contains the expected images taken from different distances etc.
Otherwise your training would be “blind” and you would only get the real performance after deploying the model.
That being said, you could certainly try to use an aggressive data augmentation and hope to capture the expected transformations already during the training. Based on your description you could try to use resizing, rotation, and generally a combination of affine transformations.