Constrain rendering by the minimum size, not the preferred size
Going below the preferred size is not ideal as it impacts the ability for the code to be scanned again, but on small phone screens this can be necessary for very large codes to be displayable at all.
Happens for example with digital vaccination certificate codes.