Supposedly no, but in reality what happens is that when a drug is approved, lots of documentation about that drug + formulation is already published as a result of the R&D processes along with agency oversight in various countries.
When a brand name drug goes off patent, everybody (including competitors and generics manufacturers) already has a pretty good idea of both 1) the commercial market for generics, and 2) the components of the drug.
What isn't shared are trade secrets disclosing manufacturing processes, as well as the inactive ingredients+formulation of the drug. Competitors & generics OEMs are left to guess and use best judgment when they create competitors to the original, and sometimes they make bad decisions.
Actual manufacturing quality should be equally high, but the resulting drug may not end up being exactly the same as the branded version, even if the differences have nothing to do with the active ingredient.