I am studying a bit about statistical mechanics for a course at my university. My book introduces first the Boltzmann entropy $S = k_b lnW$, and then the Gibbs one, $S=k_b \sum p_i lnp_i$, in what seems a derivation from the previous formula. I was confused about the meaning of this last one, in particular my book in the last part of the process divide by the number of the systems in the ensemble, talking about the mean entropy of the ensemble.
This didn't make a lot of physical sense to me, so I started searching online, and I found the paper A formal derivation of the Gibbs entropy for classical systems following the Schrodinger quantum mechanical approach available for free on reserachgate, that made a similar derivation. The paper proceeds not in a discrete fashion, like my book, but considering a continuous phase space divided in a lot of cells, then obtain the expression for the multiplicity of the macrostate of the ensemble, then uses Boltzmann's formula. At the end, when there is the passage that involves dividing by the number of copies of the ensemble, it goes like The entropy S of every system in the ensemble can be obtained by taking into account that the entropy is additive and that all the systems in the ensemble are macroscopically identical, which means that they all have the same entropy.
While the first claim is ok, the ensemble systems are in fact non interacting with each other, the second one is not: if for example we are considering a canonical ensemble, there are microstates with different energy, so they aren't macroscopically identical and we can't assume the entropies are all equal!
What am I missing?