Suppose we want to find
$$\int \frac{1}{\sqrt{x^2-a^2}}\,\mathrm dx.$$
Trigonometric substitution: $$=\ln \left| x+\sqrt{x^2-a^2} \right|$$
Hyperbolic substitution: $$=\cosh^{-1}\left({\frac{x}{a}}\right)=\ln\left({x+\sqrt{x^2-a^2}}\right)$$
How are they the same when one has the absolute value and one doesn't? Clearly, the first answer is defined for all $|x|>a,$ whereas the second one is defined only for $x>a.$
Noting that antiderivatives exist on $(-\infty,-a)\cup(a,\infty)$ and using the hyperbolic substitution $\displaystyle \theta=\operatorname{arccosh} \left(\frac{|x|}a\right):$ \begin{align}\int \frac{1}{\sqrt{x^2-a^2}}\,\mathrm dx&=\begin{cases}\displaystyle-\operatorname{arccosh}\,\left(-\frac x{a}\right)+C_1, &&&x<-a; \\ \displaystyle\mathrm{arccosh}\,\left(\frac x{a}\right)+C_2, &&& x>a \end{cases} \\&=\begin{cases}\displaystyle-\left[\ln\left(\sqrt{x^2-a^2}-x\right)-\ln (a)\right]+C_1, &&&x<-a; \\ \displaystyle\left[\ln\left(x+\sqrt{x^2-a^2}\right)-\ln (a)\right]+C_2, &&& x>a \end{cases} \\&=\begin{cases}-\ln \left(\sqrt{x^2-a^2}-x\right)+C_1+\ln(a^2), &&&x<-a; \\\ln \left| x+\sqrt{x^2-a^2}\right|+C_3, &&&x>a \end{cases} \\&=\begin{cases}\ln \left( \frac{a^2}{\sqrt{x^2-a^2}-x}\right)+C_1,&&&x<-a; \\\ln \left| x+\sqrt{x^2-a^2}\right|+C_3, &&&x>a \end{cases} \\&=\begin{cases}\ln \left( -\left(\sqrt{x^2-a^2}+x\right)\right)+C_1,&&&x<-a; \\\ln \left| x+\sqrt{x^2-a^2}\right|+C_3, &&&x>a \end{cases} \\&=\begin{cases}\ln \left| x+\sqrt{x^2-a^2}\right|+C,&&&x<-a; \\\ln \left| x+\sqrt{x^2-a^2}\right|+D, &&&x>a, \end{cases}\end{align} which is the same result as the trigonometric substitution.