Let $P\in \mathrm{GL}_n(\mathbb{Q})$ be positive definite.
Question. Can one always write $P=(\det P)^{\frac{1}{n}} AA^*$, with $A\in \mathrm{SL}_n(\mathbb{Q}[i])$ ?
Note that $P$ cannot always be written as $P=AA^*$, with $A\in \mathrm{GL}_n(\mathbb{Q}[i])$. Indeed, this would imply $\det P=a\overline{a}$, where $a=\det A$, but $\det P$ is not always a sum of two rational squares.
As well, note that $P$ can always be diagonalised, as $P=LDL^\top$, with $L,D\in \mathrm{GL}_n(\mathbb{Q})$, and $L$ lower trianglular with 1s on the main diagonal, $D$ diagonal. Thus $P$ can be assumed to be diagonal.
Probably, we cannot always take $A\in \mathrm{GL}_n(\mathbb{Q})$, as the diagonal entries of $P$ are sums of $n$ squared norms of entries of $A$, and this would not always work for $n=2$ if all the entries of $A$ are in $\mathbb{Q}$.
I don't even know the answer for $n=2$. On the other hand, one can e.g. have
$$ P=\begin{pmatrix} 2 & 0 \\ 0 & 8 \end{pmatrix} = 4AA^*, \quad A=\begin{pmatrix}\frac{1}{2}&\frac{1}{2}\\-1&1\end{pmatrix}. $$