It's just that the "made in the same factory" thing is such a ridiculous red herring. All it means it's a factory which has the equipment to make X thing, so they make X thing all the time, that's sort of the point of factories.
It does not mean that they're made out of the same ingredients or to the same recipe. You know, the parts you actually care about.
My partner worked in a pizza factory way back when, they made pizzas for all sorts of companies, weren't made out of the same stuff though. For one thing pizza comes in lots of varieties, there's not like a Hawaiian pizza factory and a meat feast pizza factory, that's (one reason) why a lot of your food says things like may contain traces of blah blah, because they also make things that contain that ingredient.
Sometimes stuff made in the same factory can be identical or near identical. Try the lower priced brand, it's probably fine! But "made in the same factory" means nothing whatsoever, it's what grandmas say to sound smart as they give you some dusty biscuit which was made of sawdust back in 1967.