Question
Let us say that I have a function $$f = {\rm Re} \left\{ {\rm tr} \left [Z^H \left( AX \right) \right] \right\} \ ,$$ where the matrices are $Z \in \mathbb{C}^{k \times n}$, $A \in \mathbb{C}^{k \times m}$, and $X \in \mathbb{C}^{m \times n}$.
I would like to take the derivative w.r.t. $X$, i.e., $\frac{\partial f}{\partial X}$.
You handled the matrix part like a pro but muddled the complex-vs-real aspects.
It helps to write the function as $$f = \tfrac{1}{2}(A^TZ^*:X + A^HZ:X^*)$$ before differentiating $$\eqalign{ df &= \tfrac{1}{2}(A^TZ^*:dX &+ A^HZ:dX^*) \cr \frac{\partial f}{\partial X} &= \tfrac{1}{2}A^TZ^*,&\frac{\partial f}{\partial X^*} = \tfrac{1}{2}A^HZ \cr\cr }$$ You must treat $(X, X^*)$ as formally independent variables, i.e. as Wirtinger derivatives.