The regex match is returning as soon as the first match is found, not waiting for more input. If your scanner is configured to terminate the scan with a keypress of Enter, you can capture that (outside of the group) and it will work:
If you’re using prefix or suffix, the regex property is ignored. If your barcodes end in #, you could use that with the updated regex I posted above, just replace Enter with #.