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.