For a complex number $A$ and a real number $B$, when does the well-known formula $(e^A)^B = e^{AB}$ fail? Or does it hold at all for complex A?
Since $e^{2\pi i} = 1$, if this formula holds for all complex numbers $A$ and real numbers $B$, then it would imply that $e^{2\pi ti}=( e^{2\pi i} )^t = 1^t=1$ for all $t$, which is obviously false.
Let's try to see what $(e^a)^b$ means first:
Well, $(e^a)^b= e^{b \cdot \ln(e^a)}$, by definition. Now, if only it were true that $\ln(e^a)=a$ then we would be happy, and $(e^a)^b$ would be our familiar $e^{ab}$.
Now, let $a=x+iy$ where $x,y$ are reals.
Then, $e^a=e^x \cdot e^{iy}$. What is $\ln(e^a)$ then? It should be $\ln(e^x)+\ln(e^{iy})$. There are no problems with $\ln(e^x)$, as $x$ is real.
However, lot of care must be taken while dealing with complex logs.For example see here. A brief reason is because $e^{iy}=e^{i(2\pi+y)}$, we are in a spot of bother. (This point is very well taken in your question).
So, there is no problem with the formula $(e^a)^b=e^{ab}$ if $a$ is real. The troubles begin when $a$ is complex, for the reasons mentioned above.
Thuus the answer to your question is that the formula hols for real $a$ and any $b \in \mathbb{C}$.