I’ve got a family member with a rare allergy. I’ve found that sometimes one or the other will have the allergen in it, but it’s not consistent between generic/branded. Always check the ingredients and never assume it’s exactly the same just because they have the same active ingredients