Here is another counterexample, also using groupoids.
For a group $G$ I will use the notation $G$ also for the corresponding one-object groupoid. If $C$ is the disjoint union of groups $G_i$ and $D$ is the disjoint union of groups $H_j$ then $C^D$ is the product over $j$ of the disjoint union over $i$ of the groupoid $G_i^{H_j}$. If $G$ is an abelian group then $G^H$ is the disjoint union, over all homomorphisms $H\to G$, of $G$.
Putting all of this together, one can work out a description of $A^A$ when the groupoid $A=\infty 1\coprod \infty\mathbb Z$ is the disjoint union of countably infinitely many trivial groups and countably infinitely many infinite cyclic groups. It comes out be the disjoint union of the following groups, each occurring a continuum's worth of times: free abelian groups of all finite ranks, and a countably infinite product of $\mathbb Z$'s.
Now let $B=\infty 1\coprod \infty\mathbb Z\coprod \mathbb Z^2$ be the disjoint union of $A$ with one copy of $\mathbb Z^2$. Then $B^B$ comes out to be isomorphic to $A^A$.