The following isn't an answer to your question, as it's only one example, but I'm not able to make comments here.
It can be definable over $M$, and quite simple. (However, note that for the model I'm going to mention, things are very different if one considers $L$-order of constructibility as opposed to just $L$-rank as defined in the question.)
Let $\lambda$ be least such that $L_\lambda\models$ ZFC and let $c$ be Cohen generic over $L_\lambda$, with $c\in L_{\lambda+2}$. (This is the least level of $L$ which contains such a Cohen generic; all bounded subsets of $L_\lambda$ which are in $L_{\lambda+1}$, are already in $L_\lambda$. But $L_\lambda$ is pointwise definable, and therefore $L_{\lambda+1}$ projects to $\omega$, and in fact, it is the $\Sigma_1$-hull of the single parameter $\{\lambda\}$ in $L_{\lambda+1}$, and using this, it is easy to define a generic $c$, and in fact, there is one which is $\Sigma_1$-definable from parameter $\{\lambda\}$.)
Now rank the sets in $L_\lambda[c]$ as follows, writing $W_\alpha$ for the sets of rank $<\alpha$. Rank $<\lambda$ is just the $L$-ordering, so $W_\lambda=L_\lambda$. Then $W_{\lambda+1}$ consists
of the (bounded) subsets of $L_\lambda$ which are in $L_\lambda[c]$. More generally, given $W_\alpha$ where $\lambda\leq\alpha<\lambda+\lambda$,
then $W_{\alpha+1}$ is the set of subsets of $W_\alpha$ which are in $L_\lambda[c]$. And take unions at limits.
Then note that $W_{\lambda+\lambda}=L_\lambda[c]$, and $\lambda+\lambda$ is least such (just by rank considerations). Clearly this ranking is definable over $L_\lambda[c]$.
So it suffices to see that this ordering is exactly $L$-rank restricted to $L_\lambda[c]$.
For this, note first that every set in $W_{\lambda+1}$ is definable from parameters over $L_{\lambda+1}$.
(Given $X\in W_{\lambda+1}$, just use a name in $L_\lambda$ for $X$ and the forcing relation and the generic $c$, each of which are definable from params over $L_{\lambda+1}$.)
But no set in $Y\in L_\lambda[c]\backslash W_{\lambda+1}$ is in $L_{\lambda+2}$, because every such $Y$ contains some $X\in W_{\alpha}\backslash L_\lambda$ with $\alpha>\lambda$, for any such $X$, $X\notin L_{\lambda+1}$.
Similarly, the constructibility rank cannot be any quicker than the $W$-rank in general. So it suffices to see that the constructibility rank is quick enough. For this, let $N_\alpha$ be the $L_\lambda$-class of "rank $\alpha$ hereditarily nice names" (so every element of $L_\lambda[c]$ has such a nice name), starting with nice names for subsets of $L_\lambda$ being those in $N_0$. (So $W_{\lambda+1+\alpha}$ is the set of all $\tau_c$ for $\tau\in N_\alpha$, where here $\tau_c$ denotes the interpretation of $\tau$ using the generic $c$; and the sequence $\left<N_\alpha\right>_{\alpha<\lambda}$ is definable over $L_\lambda$.) One observes that the name evaluation function $\tau\mapsto\tau_c$, with domain $N_\alpha$, is definable over $L_{\lambda+2+\alpha}$, and basically uniformly in $\alpha$. This is straightforward.
In some more detail: The relation of variables $(\tau,x)$ that says "$\tau\in N_0$
and $x\in L_\lambda$ and $x\in\tau_c$" is definable over $L_{\lambda+1}$, and also $W_{\lambda+1}\subseteq L_{\lambda+2}$
and the relation of variables $(\tau,x)$ that says "$\tau\in N_0$
and $\tau_c=x$" is definable over $L_{\lambda+2}$. It follows
that the relation of $(\tau,x)$ saying "$\tau\in N_1$
and $x\in W_{\lambda+1}$ and $x\in\tau_c$", is definable over $L_{\lambda+2}$, so $W_{\lambda+2}\subseteq L_{\lambda+3}$, etc. We get the evaluation functions themselves in finitely many steps later (exactly when of course depends on exactly how one codes ordered pairs etc, but this doesn't really matter), and the definitions are all uniform enough, so we can continue through limit stages.