Suppose we have a linearly reductive group $G$ acting on $X=\mathbb{A}^n_{\mathbb{C}}$ and we have a closed subvariety $Z=V(f_1,...,f_k)$, where $f_i$ are $G$-invariant functions. If we further know that $Z$ is in fact a divisor, $Z=V(f)$ and $(f)=(f_1,...,f_k)$, can we conclude that $f$ itself can be chosen to be $G$-invariant?
I don't even know if it is possible to rule out the case where $f$ is a relative $G$-invariant, that is $f(gx)=\chi (g) f(x)$ for all $g \in G, x \in X$ and a character $\chi$ of $G$.