I would be a bit skeptical about this workaround. While it would avoid the runtime error, I would expect to see a hard runtime error as a user if I want to use a layer, which cannot perform the mathematical operation internally as the input shape doesn’t allow it.
The overall use case in a batchnorm layer is:
out = (input - mean) / stddev * weight + bias

Using your suggestion you would also skip the affine parameters, which would thus also not be trained.
On the other hand, you could also skip the mean subtraction and division by stddev, which would then however yield a different activation range and could potentially diverge your model training.