Implications of Galilei-Invariance on a time-independent potential

I'm trying to compute a result shown in my classical mechanics lecture on my own. Namely, consider that a system composed of $$n$$ particles follows a law of force

$$m_k\ddot{\vec{x_k}} = \vec{F_k}(\vec{x_i};\dot{\vec{x_i}};t)$$, (1)

where we write $$i$$, but we are actually considering all positions and velocities of the system as arguments of $$F_k$$. Now, if the force can be written as a time-independent potential

$$F_k = \frac{\partial}{\partial \vec{x_k}}V(\vec{x_1},\dots, \vec{x_n})$$, (2)

we can write the Galilei invariance characterised by a rotation $$R$$ and a translation $$\vec{b}$$ as follows:

$$R\frac{\partial}{\partial \vec{x_k}}V(\vec{x_1},\dots, \vec{x_n}) = \frac{\partial}{\partial \vec{x_k'}}V(\vec{x_1'},\dots, \vec{x_n'})$$, (3)

where $$\vec{x_i'} = R\vec{x_i} + \vec{b}$$ is the Galilei-Transformation of $$\vec{x_i}$$. In my lecture, it was stated that because of this we can write:

$$V(\vec{x_1},\dots, \vec{x_n}) = V(\vec{x_1'},\dots, \vec{x_n'})$$. (4)

Now, I'm struggling to prove why (4) follows from (3). I tried using a naive chain rule on the inverse Galilei-transformation $$\vec{x_k'} \mapsto \vec{x_k}$$ but I always end up with:

$$R\frac{\partial}{\partial \vec{x_k}}V(\vec{x_1},\dots, \vec{x_n}) = R^T\frac{\partial}{\partial \vec{x_k}}V(\vec{x_1'},\dots, \vec{x_n'})$$. (5)

And I haven't yet found a way to imply (3) using (5). Now, I'm not sure if my calculations are right, or if I have missed something to prove that (3) follows from (5). I'd rather say that I've been misusing the chain rule.

The potential $$V$$ is a scalar quantity, so it is invariant under coordinate transformations. As for why 3 implies 4, I think you have to be more careful about how you're defining your gradient.