Let $(\mathcal M,g)$ be a geodesically complete Riemannian manifold, and $\mathcal X\subset \mathcal M$ be a compact, geodesically convex subset.
It is trivial that for any point $x\in\mathcal M$, there exists a unique $y\in\mathcal X$ minimizing $d(x,y)$.
But is there a unique geodesic of minimal length from $x$ to $y$ in $\mathcal M$?
No.
In $\mathbb{S}^n$, take a small closed ball (i.e. south of the equator) centered at the south pole. There is no unique $y$ that minimizes the distance from the north pole (the whole boundary is a constant latitude circle and hence every point there minimizes $d(N,-)$).