This is not an answer but it became too long for a comment. I would expect that every finite $\lambda>2$ has the property.
By Corner, for every finite $\lambda>2$ there exists an abelian group $G$ such that $G\cong G^\lambda$ but $G\ncong G^k$ for every $1<k<\lambda$. See a discussion here: http://mathoverflow.net/a/10194/16678https://mathoverflow.net/a/10194/16678.
Then by Trnková [1], every such group $G$ can be represented as $G\cong{\rm maps}(X,X)$ where $X$ is a metric space and ${\rm maps}$ is the set of non-constant maps. The group operation is the composition. Actually the result of Trnková is way more general, but this is what we might need.
I hoped that I would deduce an answer to your question from these results ans some general nonsense, but it is not so immediate we have ${\rm maps(X,X)}\cong{\rm maps}(X,X)^\lambda\subsetneq{\rm maps}(X,X^\lambda)$. We lack a bijection on the right side since there exist non-constant maps into product that are constant on some axes. If you want to find an answer to your question you may try to look into these two papers and put the Corner ideas into the context of Trnková's construction hoping they could work together :)
[1] V. Trnková, Non-constant continuous mappings of metric or compact Hausdorff spaces, Comment. Math. Univ. Carolinae 13 (1972) 283–295.