Does there exist a smooth map $f:\mathbb{R}^2 \to \mathbb{R}^2$ such that:
- $\det df$ is not constant.
- $d(\det df)(e_1)df(e_2)=d(\det df)(e_2)df(e_1)$.
Such a map cannot be an immersion, since if $df$ is invertible, then $df(e_1),df(e_2)$ are linearly independent, hence $d(\det df)=0$.
Of course, that does not rule out $\det df \neq 0$ at some points. It only means that $\det df \neq 0 \Rightarrow d(\det df) = 0$.
You're basically there - your last deduction by itself implies that $\det df$ is constant:
Suppose you have a $C^1$ function $g : \mathbb R^n \to \mathbb R$ satisfying $g(x) \ne 0 \implies dg(x) = 0$. If $g$ is not constant, then there is some point $y$ and direction $e_i$ such that $\partial_i g(y) \ne 0$, and thus by continuity of $\partial_i g$ there is some $\epsilon > 0$ such that the restriction of $g$ to the line segment $[y -\epsilon e_i, y+\epsilon e_i]$ has derivative with constant sign. Thus $g$ takes on uncountably many values on an interval where $dg \ne 0$, a contradiction.