If you mean that your function $w$ vanishes on the critical values and nowhere else, then the answer is no.
Take $(y_1,y_2)=(x_1^2,x_1x_2)$. The Jacobian determinant is zero on the line
$x_1=0$ but the image of this line is one point $(0,0)$. And the zero set of a holomorphic function cannot be one point.

If you mean that $w$ vanishes on the critical values, and perhaps somewhere else,
then the answer is yes and trivial: take $w=0$.

EDIT. In the comments the question was modified as follows: does there exist a
function $\not\equiv 0$ which is zero on the image of the critical set. To this the answer is yes when $n=2$ and no when $n\geq 3$.

Consider this map for $n=3$
$$x=u+w^2,\quad y=uv+w^2,\quad z=uve^v+w^2.$$
The Jacobian in zero in sufficiently small neighborhood of the origin of and
only if $uvw=0$. Take the plane $w=0$. Its image is described parametrically as
$$x(u,v)=u,\quad y(u,v)=uv,\quad z(u,v)=uve^v.$$
It is a famous result of W. Osgood that there is no non-zero analytic function
satisfying $G(x(u,v),y(u,v),z(u,v))\equiv 0$.

Ch. Osgood, On functions of several complex variables, Trans. AMS 17 (1916), 1,
1-8, Theorem 1.

When $n=2$, the image of the critical set in a neighborhood of the origin
is either a point or a curve. It is well-known and easy to prove that
a parametrized curve is an analytic set.

1more comment