Let $\Omega \subset \mathbb{R}^{N}$ be a bounded $C^{2}$-domain. Take $V$ as a subset of $\Omega$ and define a smooth function $\phi$ such that $\phi \in C^{2}(\overline{V})$ and attains a local maximum at $x_{*} \in V$ but not on $\partial V$. Can we extend $\phi$ such that it becomes a $C^{2}(\overline{\Omega})$ function and still attains its maximum at $x_{*}$?
Intuitively, it seems doable at least in $\mathbb{R}$ and $\mathbb{R}^{2}$ but I would like a rigorous explanation of how to extend $\phi$ into the original domain.