I am reading some notes on representation theory, and I have found myself confused by the following proposition:
Suppose $G$ is a finite abelian group, then every complex representation $V$ of $G$ has a unique isotypical decomposition
I have also read that this is true in the case of $G$ non-abelian, and if the characteristic of the scalar field does not divide $|G|$.
The isotypical decomposition is only defined for $V$ a completely reducible representation: $$ V\cong\bigoplus_{i\in I} V_i $$ and the notes define the isotypical decomposition to be unique if $V$ is the direct product of all $S$-isotypic components as $S$ varies over all irreducible subrepresentations of $V$ (up to isomorphism).
The $S$-isotypic component can be realised as $\sum_{V_i\cong S} V_i$. I am confused because if $\sum_{i\in I}V_i=\bigoplus_{i\in I}V_i$, then surely $\sum_{V_i\cong S}V_i=\bigoplus_{V_i\cong S}V_i$ , hence all isotypical decompositions would be unique? This would be because $\bigoplus_{S \text{ irreducible and unique up to isomorphism}}\bigoplus_{V_i\cong S}V_i=\bigoplus_{i\in I}V_i\cong V$.
What's gone wrong here? What breaks when $|G|$ is a multiple of the characteristic (or when $G$ is infinite)? I have not learnt about characters yet, so if answers could avoid using those, that would be appreciated.