As mentioned by Matemáticos Chibchas, the statement is not true if the underlying field is not algebraically closed. More precisely, the statement is not true if the underlying field is not a splitting field of the characteristic polynomial of $A$.
As mentioned by loup blanc, when the underlying field is a splitting field of the characteristic polynomial of $A$ (so that $A$ has $n$ eigenvalues in the field, counting multiplicity), the statement can be easily proved by triangularising $A$.
Without using triangularisation, the statement can be proved in two steps as follows (see Graham (2018), Matrix Theory and Applications for Scientists and Engineers, theorems 7.6 and 7.7):
Theorem 1. Let $A\in M_n(F)$. If $F$ is a splitting field of the characteristic polynomial of $A$ and the spectrum of $A$ (as a multiset) is $\{\lambda_1,\lambda_2,\ldots,\lambda_n\}$, then for every polynomial $p\in F[x]$, we have
$$
\det\left(p(A)\right)=\prod_{i=1}^np(\lambda_i).
$$
Proof. By assumption, we have $\det(A-xI)=\prod_{i=1}^n(\lambda_i-x)$.
Let $p(x)=c\prod_{k=1}^r(x-c_k)$. Then
\begin{aligned}
\det(p(A))
&=\det\left(c\prod_{k=1}^r(A-c_kI)\right)\\
&=c^n\prod_{k=1}^r\det(A-c_kI)\\
&=c^n\prod_{k=1}^r\prod_{i=1}^n(c_k-\lambda_i)\\
&=\prod_{i=1}^n\left[c\prod_{k=1}^r(c_k-\lambda_i)\right]\\
&=\prod_{i=1}^np(\lambda_i).
\end{aligned}
Theorem 2. With the assumptions in theorem 1, $p(A)$ has $n$ eigenvalues in $F$ and they (counting multiplicity) are $\{p(\lambda_1),p(\lambda_2),\ldots,p(\lambda_n)\}$.
Proof. Let $y$ be an indeterminate independent of $x$. Let $K$ be the algebraic closure of the field of fractions of $F[y]$. Then $f(x)=y-p(x)$ is a polynomial with coefficients in $K$ and hence it splits in $K$. By theorem 1 (with $K$ and $f$ taking the roles of $F$ and $p$),
$$
{\det}_{F[y]}(yI-p(A))
={\det}_{F[y]}(f(A))
={\det}_{K}(f(A))
\stackrel{\text{thm 1}}{=}\prod_{i=1}^nf(\lambda_i)
=\prod_{i=1}^n\left(y-p(\lambda_i)\right).
$$
Hence the result follows.