Finding $\max |A|$ with $a_{ij}=\pm 1$

$A$ is a matrix sized $n\times n$, all elements in $A$ are $\pm1$. Find $\max |A|$.

My Attempt
Denote $f(n)=\max |A_{n\times n}|$.
$f(1)=1$.
$f(2)=2$ is also obviously.
If $n\ge2$, $|A|$ must be even.
For $n=3$, $f(3)\ge4$ because $\left|\begin{array} r1&1&1\\1&-1&1\\1&-1&-1 \end{array}\right|=4$. Also, $|A|=A_{11} A_{22} A_{33}+A_{12} A_{23} A_{31}+A_{13} A_{21} A_{32}-A_{13} A_{22} A_{31}-A_{11} A_{23} A_{32}-A_{12} A_{21} A_{33}$ can not be $6$ since $A_{11} A_{22} A_{33}A_{12} A_{23} A_{31}A_{13} A_{21} A_{32}A_{13} A_{22} A_{31}A_{11} A_{23} A_{32}A_{12} A_{21} A_{33}$ must be $1$. $1\ne 1\cdot1\cdot1\cdot(-1)\cdot(-1)\cdot(-1)$.
Hence we have $f(3)\ne 6$. $f(3)=4$.
For $n\ge4$, I have no idea where to start with $f(n)$.
A trivial bound is $0<f(n)\le n!$.
EDIT
Related question:Maximum value of Determinant of $3 \times 3$ Matrix with entries $\pm 1$
It is not duplicated since I am discussing $n\times n$ determinants, not $3\times3$.


From comments:

This is a semi-well-known open problem known as Hadamard's maximum determinant problem.