I found the reason for the issue. There was a problem with labels roll, but I don't know exactly what was wrong with it. I set a new labels roll and it started to work correctly. I checked the old one again and there was the issue. Perhaps the gap sensor wasn't stick to the label and it didn't notice gaps and generally label.