Edit: I am so sorry. Apparently I made a huge mistake. Here is the final version of the question.
Let us suppose we have a functional of f such that $f=f((\vec{r}(t),t)$ where $\vec{r}(t) = a(t)\vec{x}(t)$.
I am trying to derive an equation such that
$$\left.\frac{\partial}{\partial t}\right|_r = \left.\frac{\partial }{\partial t}\right|_x + \left.\frac{\partial \vec{x}}{\partial t}\right|_r \cdot \nabla_x $$
where $\nabla_r = \frac{1}{a}\nabla_x$
It is actually about coordinate transformation.

Questions like this exhibits exactly why people shouldn't use thermodynamic notation.
Anyway. I am going to introduce an auxiliary variable to make the change clear. You have two coordinate systems $(\vec{r},\tau)$ and $(\vec{x},t)$, related by $$ \tau = t, \qquad \vec{r} = a(t) \vec{x} $$
What you write as $\dfrac{\partial}{\partial t}\Big|_{\vec{r}}$ is the partial derivative $\partial_\tau$ in the $(\vec{r},\tau)$ coordinates, and the derivative $ \dfrac{\partial}{\partial t} \Big|_{\vec{x}}$ is the partial derivative $\partial_t$ in the $(\vec{x},t)$ coordinates.
Standard coordinate transformation tells you
$$ \partial_\tau = \frac{\partial t}{\partial\tau} \partial_t + \frac{\partial \vec{x}}{\partial \tau}\cdot \nabla_{\vec{x}} $$
The change of variables can be rewritten in the form $$ t = \tau, \qquad \vec{x} = \vec{r} / a(\tau) $$ and hence $$ \frac{\partial t}{\partial \tau} = 1 \qquad \frac{\partial \vec{x}}{\partial \tau} = - \vec{r} \frac{\dot{a}(\tau)}{a^2(\tau)} $$