I was studying about scattering across a one-dimensional unknown potential ( pretty elementary Quantum Mechanics) and how, if we know the $S$-matrix of such a system, we can deduce an awful lot of information about the potential. Also, the $S$-matrix satisfies some properties. First, for the sake of notational clarity, let me define it. Suppose there exists a potential $V(x)$ such that it is zero everywhere but some other arbitrary function between $-a/2$ and $+a/2$.
Now, by treating this time independently such that plane waves hit the potential and are reflected or transmitted accordingly, I can write the wave function as follows:
$$\psi(x)= \begin{cases} Ae^{ikx} + Be^{-ikx},& \text{for } x\leq -a/2\\ Ce^{ikx} + De^{-ikx},& \text{for} x\geq +a/2\\ \end{cases}$$
Now we create a 2x2 matrix called the S-matrix which relates incoming amplitudes $A,D$ to outgoing amplitudes $B,C$ such that
$$ \begin{pmatrix} B \\ C \\ \end{pmatrix}= \begin{pmatrix} S_{11} & S_{12} \\ S_{21} & S_{22} \\ \end{pmatrix} \begin{pmatrix} A \\ D \\ \end{pmatrix}$$
Now to prove that this matrix is unitary, many sources including Wikipedia use the fact that since the integral of probability density $\int_{-\infty}^{\infty}|\psi(x,t)|^2=1$ is time-independent, $J_{left}=J_{right}$ where $J_{left}$ and $J_{right}$ are probability currents to left and right of the potential, which implies that $|A|^2-|B|^2=|C|^2-|D|^2$ which can then further be used to prove unitarity. My main question is how did everyone deduce that $J_{left}=J_{right}$ and that current inside the potential region is 0? How do I know there exists no probability for the particle to stay inside that region? And even if I know that, how can the above result be derived? Any sort of help would be really appreciated.