Is the graph of a Sobolev function “almost geodesically complete”? Definitions and notation:
Let $\Omega$  be a open, convex, bounded subset of $\mathbb R^n$ with Lipschitz boundary, and $f \in W^{1,1}(\Omega)$ a Sobolev function. Given $x \in Ω$, we denote by $x’$ the point $(x, f(x)) \in \Omega \times \mathbb R$.
Consider the graph $G_f$ of $f$ as a subset of $\Omega \times \mathbb R $, where we choose an ACL (absolutely continuous on lines) representative of $f$. Then $G_f$ admits a path connected component $\Gamma$
whose projection to $\Omega$  has full measure.
Given two points $a \neq b$ in $\Gamma$, denote by $S(a, b)$ the set of rectifiable curves in $\Gamma$ joining $a$ to $b$, and $A$ the arc length functional on $S(a, b)$, where arc length is computed with respect to the Euclidean metric on $\Omega \times \mathbb R$.

Question:
Does $A$ admit a minimiser for almost every $a, b$? More precisely, is
the set of tuples $(x, y)$ such that $A$ has a minimiser on $S(x’,
 y’)$ of full measure in $\Omega \times \Omega$?

Note: We equip $\Omega$ with the usual Lebesgue measure, and $\Omega \times \Omega$ with the product measure.
 A: The following is not a full proof, as I skip on some calculation details, just an extension of the remark I made in a comment but I am pretty certain it is correct.
The answer is no, at least not wrt. to minimal geodesics
Boundary case: The first counterexample shows that we can force the curve to touch the boundary. Consider the domain $\Omega = \{x \in \mathbb{R}^2, x_1 > 0\}$ and the function
$$f(x) := c_1 \max(0, x_1 - c_2 |x_2|)$$
for $c_1,c_2$ large. This is effectively a big, wedge-shaped bump touching $\partial \Omega$. If we add some cutoff for $x_1$ very large, this does not influence paths for points closer to $0$ and we can have $f \in W^{1,1}(\Omega)$  (in fact with a bit more work, one could even find a smooth $f$ with the same effect).
Now for $a,b\in \Omega$ with $a_1,b_1 \ll 1$ and $a_2, -b_2 \gg 1$ the shortest path (pulled back to $\Omega$) between $a$ and $b$ would consist of the two straight lines $[a,0]$ and $[0,b]$ and thus touch the boundary. In fact you can see that by geometry: The graph $G_f$ consists of 4 flat triangles (ignoring the part far away from $0$), so you can flatten it into a planar domain with the same geodesics as straight lines. But as the angles at $0$ do add up to more than $\pi$, it will not be convex, so some shortest curves will touch $0$.
Furthermore, for any convex domain except $\mathbb{R}^2$, you can find a boundary point for which a similar construction works, as $c_1$ and $c_2$ allow us to control the angles involved.
Whole-space case: For this consider $$\tilde{f}(x) := f(x) - f(-x) + c_3\frac{x_1}{|x|}$$
for $c_3 >0$ small. With the cutoff omitted again, this is in $W^{1,p}(\mathbb{R}^2)$ for $1\leq p < 2$.
I claim (without full proof) that for $a,b$ in a similar range to before the limiting shortest curves will go through $0$, as the $f$ terms dominate. But if $a_1,b_1 > 0$, the curve will approach $0$ from $x_1 > 0$ and if $a_1,b_1 < 0$ from $x_1 < 0$. So since $\lim_{x_1\nearrow 0} \tilde{f}(x_1,0) = -c_3 \neq c_3 = \lim_{x_1\searrow 0} \tilde{f}(x_1,0)$, there is no choice of representative where both are possible without a jump.
Some remarks:

*

*Due to the cutoff, there might be some stationary points of the length functional, going the long way round and somehow bending of the cutoff in just the right way, but those you can probably also get rid of.

*On the full space, for $p > n$ the result should be trivial as $f$ is continuous. $p=n$ could be interesting though.

*Depending on the application it would make sense to extend the graph by all possible limits, e.g. consider the closure $\overline{G_f}$, also with respect to the boundary. In that case you should have geodesics again.

