As discussed for example in this question, given any pair of real squared matrices $A,B$ we have the identity $$|\det(A+iB)|^2 = \det\begin{pmatrix}A&B\\ -B&A\end{pmatrix}.$$ In particular, this means that $\det\begin{pmatrix}A&B\\ -B&A\end{pmatrix}$ must be writable as the sum of squares of two polynomials in the elements of $A,B$. Namely, it equals the sum of the squares of real and imaginary parts of $\det(A+iB)$, which are polynomials in the elements of $A$ and $B$.
While this is clear from the above identity using complex numbers, is there a direct way to see that this is true reasoning only on the structure of this matrix, without passing through complex numbers? On the face of it, it looks like there should be a reasoning similar to what is done to show that the determinant of skew-symmetric matrices can be written as the square of the Pfaffian, but I'm not sure how to make this into a precise argument.
This also relates to Calculating the determinant gives $(a^2+b^2+c^2+d^2)^2$? and Prove that $\left|\begin{smallmatrix}a&-b&-c&-d\\b&a&-d&c\\c&d&a&-b\\d&-c&b&a\end{smallmatrix}\right|=(a^2+b^2+c^2+d^2)^2$, where the structure of the matrices considered in those questions is such that $\det(A+iB)$ is either purely real or purely imaginary. In fact, using the expressions in those posts as starting point and some guess work, it seems we have, at least when $A,B$ are $2\times2$, the decomposition $$\det\begin{pmatrix}A&B\\-B&A\end{pmatrix} = (\det(A)-\det(B))^2 + (a_{11} b_{22} - a_{12} b_{21} + a_{22}b_{11} - a_{21}b_{12})^2.$$ The second term can also probably be cast in a more neat form.