Dimension of maximal totally isotropic space over finite field with standard bilinear form

Take a solution to $a^2+b^2+1=0$, there is always one for $k$ a finite field.

For $x\in k^4$, let $P(x)=(x_1,x_2,ax_3+bx_4,-bx_3+ax_4)$.

You'll get that $$\langle P(x),P(y)\rangle = x_1y_1+x_2y_2-x_3y_3-x_4y_4$$ which has an obvious totally isotropic 2-dimensional subspace, namely $x_1=x_3,x_2=x_4$.

Then write $n=4m+d$ and decompose $k^n$ as $m$ copies of $k^4$ and one copy of $k^d$, all mutually orthogonal.

We get a totally $\langle.,.\rangle$-isotropic $2m$-dimensional subspace in the $m$ copies of $k^4$,

If $d=0$ or $d=1$ then this is optimal.

If $d=3$ then there is an additional isotropic vector in the copy of $k^d$, namely the vector $(a,b,1)$, so this is optimal again.

For the remaining case $d=2$, I don't know. For $n=2$ there is a $n/2$ totally isotropic subspace of $k^n$ iff $t^2+1$ has a root in $k$. No idea if it stays true for $n=6$ as well.


Supplementing reuns's excellent answer with the following.

Result: If $n\equiv2\pmod4$ and $-1$ is not a square in the field $K=\Bbb{F}_q$, then the space $K^n$, equipped with the standard bilinear form, does not have an $n/2$-dimensional totally isotropic subspace.

Proof. Write $k=n/2$, so $k$ is odd. Assume contrariwise that $V$ is a totally isotropic subspace. Let $g_1,g_2,\ldots,g_k$ be a basis of $V$. Let $A$ be the $k\times 2k$ matrix with rows $g_1,\ldots,g_k$. Without loss of generality we can assume that $A$ is in a reduced row echelon form. By shuffling the columns, if necessary, we can further assume that $A$ has the block form $$ A=\left(\,I_k\,\vert\, B\,\right) $$ where $B$ is some $k\times k$ matrix.

The assumption about total isotropicity is equivalent to the requirement $AA^T=0_{k\times k}$. By expanding the matrix product in block form we see that this is equivalent to the requirement $$ BB^T=-I_k. \qquad(*) $$ Let's look at the determinants. On the left hand side of $(*)$ we have $(\det B)^2$. On the right hand side we have $(-1)^k$. As $-1$ was not assumed to be a square, and $k$ is odd, this is a contradiction.