I have noticed the following:
$$\left( (-1)^{1/2} \right)^2 = i^2= -1$$ But $$\left( (-1)^{2} \right)^{1/2} = \sqrt{1} = 1$$ I understand with complex numbers there is an issue of taking the principal root, yet this problem is still present. Under what circumstances will exponents commute?
Integer powers commute. If $a,b\in \Bbb Z$, then $(z^a)^b=z^{ab}=(z^b)^a$, for any complex $z$. Further, if $x$ is a positive real number, any real powers commute, so $(x^a)^b=x^{ab}=(x^b)^a$ for $a,b\in\Bbb R$.
Outside of those special cases, it’s best to be careful.