Does the intrinsic and extrinsic distances coincide on the interior?

Let $M$ be a Riemannian manifold with boundary. Consider the interior of $M$ (which we denote by $M^\circ$).

$M^\circ$ is an open submanifold of $M$. Let $d_M$ be the induced distance function (induced by the Riemannian metric on $M$ in the standard way), and let $d_{M^\circ}$ be the induced (intrinsic) distance on $M^\circ$. (Note that $M^\circ$ is connected so it makes since to consider its intrinsic distance).

Is it true that $d_M|_{M^\circ}=d_{M^\circ}$?

(i.e does the intrinsic and extrinsic distances on $M^\circ$ coincide?)

I am pretty sure the answer is positive, since it seems reasonable that for every part of a path which lies on the boundary, we can perturb it a little bit so it will be inside the iterior, without increasing the length too much. (Similar to what is done in the answer to this question, for instance).

It would be nice to find an elegant argument.

Let $p,q$ be two point in $M^o$, and let $\gamma$ be a length-minimizing geodesic between them (that may intersect the boundary). We want to show that for every $\epsilon>0$ there exists $\gamma_\epsilon$ between $p$ and $q$ such $\ell(\gamma_\epsilon)<\ell(\gamma) + \epsilon$.
By covering $M$ with a finite number of charts, the problem is reduced to modifying $\gamma$ in each coordinate chart. We don't need to modify $\gamma$ in charts where it does not hit the boundary, so let's consider one chart, modeled on $\mathbb{H}^n$ (that half space), with a metric $g_{ij}$, with $\gamma:[a,b]\to \mathbb{H}^n$ be a curve of finite length there. Assume further that $\gamma(a)$ and $\gamma(b)$ are not on the boundary (the argument can be easily adjusted if they do). Now $\gamma+(\delta,0,\ldots,0):[a,b]\to \mathbb{H}^n$ does not hit the boundary, and for $\delta>0$ small enough it is of length arbitrary close to the length of $\gamma$. Now, connect $\gamma(a)$ with $\gamma(a) + (\delta,0,\ldots,0)$ with a length minimizing geodesic. For small enough $\delta$ it does not hit the boundary, and the added length is arbitrarily small, resulting in a curve in the interior between $\gamma(a)$ and $\gamma(b)$ with length arbitrary close to that of $\gamma$.