Your problem probably comes from the fact that you have a stretch setting for the image field into which you insert the barcode. You can't do that because the barcode needs specific proportions between dashes and breaks to work, and stretching the image can't maintain those proportions.
Therefore, you need to set the scale so that the code fits on the label. From the examples you gave, the second code doesn't fit on a 10cm label at scale 2 (you need to set the scale to 1) but the first and 3rd codes will fit on this label without any problem ( at scale 2).
You can also set the scale to 0, then the corresponding scale will be set based on the maximum width of the code.
In the attachment you have a reworked previous example so that you can see what the problem is.