A quite popular exercise in linear algebra is the following (or very related exercises, see for example https://math.stackexchange.com/questions/299651/square-matrices-satisfying-certain-relations-must-have-dimension-divisible-by-3 and https://math.stackexchange.com/questions/3109173/ab-ba-invertible-and-a2b2-ab-then-3-divides-n):

Let $K$ be a field of characteristic different from 3 and $X$ and $Y$ two $n\times n$-matrices with $X^2+Y^2+XY=0$ and $XY-YX$ invertible. Then 3 divides $n$.

A (representation-theoretic) proof can be given as in the answer of Mariano Suárez-Álvarez in https://math.stackexchange.com/questions/299651/square-matrices-satisfying-certain-relations-must-have-dimension-divisible-by-3 .

Question: Is this also true for fields of characteristic 3?

edit: So it turned out that the result holds for any field. A bonus question might be to find a proof that works independent of the characteristic of the field.