I am aware of the following identity
$\det\begin{bmatrix}A & B\\ C & D\end{bmatrix} = \det(A)\det(D - CA^{-1}B)$
When $A = D$ and $B = C$ and when $AB = BA$ the above identity becomes
$\det\begin{bmatrix}A & B\\ B & A\end{bmatrix} = \det(A)\det(A - BA^{-1}B) = \det(A^2 - B^2) = \det(A-B)\det(A+B)$.
However, I couldn't prove this identity for the case where $AB \neq BA$.
EDIT: Based on @Trebor 's suggestion.
I think I could do the following.
$\det\begin{bmatrix}A & B\\ B & A\end{bmatrix} = \det\begin{bmatrix}A & B\\ B-A & A-B\end{bmatrix} = \det(A^2-B^2) = \det(A-B)\det(A+B)$.
Let's say $A, B$ are $n \times n$ matrices with entries from a field with characteristic $\ne 2{}^{\color{blue}{[1]}}$.
Let $I$ be the $n \times n$ identity matrix and $J = \begin{bmatrix}I & I \\ -I & I\end{bmatrix}$. Since $\det J = 2^n \ne 0$, $J$ is invertible.
Notice $$ J \begin{bmatrix}A & B \\ B & A\end{bmatrix} = \begin{bmatrix}A+B & A+B \\ B-A & A-B\end{bmatrix} = \begin{bmatrix}A+B & 0 \\ 0 & A-B\end{bmatrix} J $$ We have $$\det\begin{bmatrix}A & B \\ B & A\end{bmatrix} = \det\begin{bmatrix}A+B & 0 \\ 0 & A-B\end{bmatrix} = \det(A+B)\det(A-B)\tag{*1} $$
Notes
$\color{blue}{[1]}$ - As demonstrated by @Just a user's answer, the requirement that entries from a field with characteristic $\ne 2$ can be dropped. $(*1)$ continues to work when entries of $A,B$ take values from any commutative ring.
Aside from using row/column operations as in @Just a user's answer, we can use the fact that LHS and RHS of $(*1)$ are polynomials with integer coefficients in entries of $A,B$. Since they are equal as a polynomial, it remains equal when we substitute the entries by elements from any commutative ring.