Let $(M,g)$ be an $n$-dimensional, connected, compact Riemannian manifold with boundary. Assume we are given an immersion $f:M \to \mathbb{R}^n$. (i.e $df$ is invertible at every point $p \in M$, note that I assume $n$ is the dimension of $M$).
Let $\omega:(M,g) \to (\mathbb{R}^n,e)$ be the harmonic function corresponding to the Dirichlet problem imposed by $f$, i.e $\omega|_{\partial M}=f|_{\partial M}$.
Is it true that $\omega$ must be an immersion? Does anything change if we assume $f$ is (globally) injective?
Remark. Note that since $f$ is an immersion, it is locally injective, hence $f|_{\partial M}$ is locally injective. (In particular naive "counter-examples" like taking $\,f|_{\partial M}$ to be constant so $\omega$ is constant do not work). In fact we have $\text{rank}(d\omega_p)\ge \text{rank}\big(d(\omega|_{\partial M})_p\big)= \text{rank}\big(d(f|_{\partial M})_p\big)=n-1$ for every $p \in \partial M$.