Fermat's Library tweeted five hours ago that $e^\pi$ can be proved to be transcendental as follows. Let $A=-1$ and $B=-i$. Then $A$ and $B$ are algebraic numbers, $A\ne0,1$ and $B$ is not rational. Therefore, by Gelfond-Schneider theorem, $$A^B=e^\pi=(e^{i\pi})^{-i}=(-1)^{-i}\tag{1}$$ is a transcendental number.
The same equality $(1)$ is also mentioned in Wikipedia, but I am confused because an answer on this site stated that the rule $x^{yz}=(x^y)^z$ is valid only when $x>0$ and $y$ is real. Does the rule really apply here? Is the proof in the aforementioned tweet valid?