Let the square root be defined by the principal branch of the log function. Compare the function $\sqrt{z^2-1}$ and $\sqrt{z-1} \sqrt{z+1}$. Where are the discontinuities of each function?
My attempt: Let $\sqrt{z^2-1} = e^{\frac{1}{2} (\ln |z^2-1| + i\arg(z^2-1))}$
This function is discontinuous when $z^2-1$ would take values on the negative part of the real line, as the principal branch is $(-\pi,\pi]$.
Consider a $k \in \mathbb{R}$, $k>0$.
If $z^2-1=-k \implies z^2 = -k+1 \implies z = \sqrt{-k+1}$ or $z=-\sqrt{-k+1}$.
Therefore, for $z\in (-1,1)$ and $(-i\infty,i0)\cup(i0,i\infty)$, the given function would be discontinuous.
Similarly, if $z+1=-k \implies z=-1-k$. This implies for $z \in (-\infty,-1)$, $\arg(z-1)$ will be discontinuous. If $z-1=-k \implies z=-k+1$. This implies for $z\in (-\infty,1), \arg(z+1)$ will be discontinuous.
Therefore, for $z\in (-\infty,1)$, $\sqrt{z-1} \sqrt{z+1}$ will be discontinuous.
Is this proof correct? If yes, why does such a decomposition yield a different result?
Always keep in mind that from the mathematical view point, a function is not just a formula but also it requires specifying a domain in which it is meaningful. So in particular for the two formulas that you mention, are not just continuous but meaningful in different domains, and the equality between them can be only asserted in the intersection of them! (i.e.: outside the negative real axis)
The second expression is simply not well-defined in the negative real axis.