Let $f: \mathbb R^n \to \mathbb R$ be a Lipschitz function with $\nabla f$ nonzero almost everywhere with respect to Lebesgue measure.
What is the supremal Hausdorff dimension of the set on which $f$ is differentiable with $\nabla f = 0$?
Checking this in perfect detail might be a bit technical, but the following looks like it could work for any dimension up to n:
For 1d: Take an S curve $\phi: [0,1] \to [0,1]$ such that $\phi(0) = 0$, $\phi(1) = 1$ and $\phi'(0) = \phi'(1) = 0$ and nonzero derivative elsewhere. Now for a (non-fat) Cantor-set C on any dimension, replace the removed intervals with a rescaled copy, lined up to be continuous. Specifically scale it in such a way that replacing an interval of length $l$ is done by a shifted version of $l^2 \phi(x/l)$. Call the resulting function $u$. Then $u' \neq 0$ on the interior of all removed intervals, which is a set of full measure.
What is left to show is that $u' = 0$ on the Cantor-set. Call $u_k$ the approximating function, where only intervals of order up to $k$ are replaced. Certainly $u_k' = 0$ on C. Additionally, as the maximum derivative gets exponentially smaller the smaller the intervals get, we should have $u_k \to u$ in $C^1$, so the same has to hold for the limit.
For n dimensions, just do the same in one direction and keep it constant in the others.
This example is essentially the same in mlk’s answer, so I just give it as a variation on their construction for $n=1$.
The zero-set of a $C^\infty$ function $g: \mathbb R \to \mathbb R$ can be every closed set $C\subset \mathbb R$ (a well-known result by Whitney in $\mathbb R^n$, which is easy for $n=1$; if we are OK with a Lipschitz function, we can just take $g(x):=\text{dist}_C(x) $). A primitive $f$ of $g$ is a differentiable function such that $\{f’=0\}=C$.
So, since $C$ can have zero Lebesgue measure and any Hausdorff dimension less than $1$, one concludes as in mlk’s answer.