Solution (source code)

= Solution

With $u=XY$, divide the separated equation on $x\ne0$, $y\ne0$ to obtain
$$
\frac{e^xX'}{xX}=\frac{yY'}Y=\lambda.
$$
Thus $X'/X=\lambda xe^{-x}$ and $Y'/Y=\lambda/y$. Taking <antiderivatives>,
$$
X=Ae^{-\lambda(x+1)e^{-x}},\qquad Y=B|y|^\lambda.
$$
Choose $\lambda=1$ and the signed branch $Y=y$. A nonconstant solution, smooth for every real $x,y$, is
$$
\boxed{u(x,y)=y\exp[-(x+1)e^{-x}]}.
$$
Indeed $u_x=xe^{-x}u$ and $u_y=\exp[-(x+1)e^{-x}]$, so $e^xu_x-xyu_y=0$. This verification includes the axes excluded temporarily during separation.