It would not be possible using the barcode field. You could possibly create a rule to allow you to store additional barcodes in custom product tags then handle selecting the product when the barcode is scanned - however I’m not sure how straightforward that would be.
I would suggest against this though - barcodes are unique on each flavour for a reason. If you are using or ever want to use inventory, you will want to have the 5 flavours as different products so you can manage inventory of each.
Why would you not want to have them as separate products anyway? You are using barcode to add the products to the ticket, so having multiple products won’t be an issue and gives you the most flexibility. If it’s because you want to save time entering products, I would say the extra effort in entering products will give you less headache in the future and your data for inventory, reporting, etc., will be better. You can easily create the first product then right click and select “clone” to duplicate it for quick adding products, or you can import products using the batch create option.