$f:]-\infty, 0]\to [-1/e,0], x\mapsto x e^x$ is not injective. In fact, there are two different "branches" of the lambert W function. One is $W_0:[-1/e,0]\to[-1,0]$ and one is $W_{-1}:[-1/e,0]\to]-\infty,-1]$. They both satisfy $f\circ W_0=f\circ W_1=\operatorname{id}_{[-1/e,0]}$. You may think of this as the fact that the equation $$x e^x = -\frac 23 e^{-\frac 23}$$ has two distinct real solutions, one of them being $$W_0(-2/3 e^{-2/3})=-2/3$$ and the other being $$W_{-1}(-2/3 e^{-2/3})\approx -1.429.$$
Here is a desmos plot:
