Consider a particle moving freely, where $\vec{r}(t)$ is the position of the particle. Suppose I move into a frame with $$\vec{r}' =\vec{r} + \epsilon \vec{F}(\vec{r}, t)\tag{1},$$ where $\epsilon$ is an infinitesimal variation and $\vec{F}(\vec{r}, t)$ is an arbitrary function (e.g. $\vec{F}(\vec{r}, t) = 1 \vec{u}$ for translation, $F(\vec{r}, t) = t \vec{u}$ for Galilean boosts, $F(\vec{r}, t) = \vec{u} t^2/2$ for accelerating frames, where $\vec{u}$ is a unit vector in an arbitrary direction etc.). The Lagrangian in the new frame is given by (to first order):
\begin{align} L(\vec{r}', \dot{\vec{r}'}, t) &\equiv L'(\vec{r}, \dot{\vec{r}}, t) = L(\vec{r} + \epsilon \vec{F}, \dot{\vec{r}}+ \epsilon \dot{\vec{F}}, t) \Leftrightarrow \end{align}
\begin{align} L' = L + \frac{\partial L}{\partial \vec{r}} \cdot \epsilon \vec{F} + \frac{\partial L}{\partial \dot{\vec{r}}} \cdot \epsilon \dot{\vec{F}} \tag{2}\end{align}
Using the chain rule (or integration by parts):
\begin{align} L' = L + \frac{\partial L}{\partial \vec{r}} \cdot \epsilon \vec{F} + \frac{d}{dt}( \frac{\partial L}{\partial \dot{\vec{r}}} \cdot \epsilon \vec{F}) - \frac{d}{dt}( \frac{\partial L}{\partial \dot{\vec{r}}}) \cdot \epsilon \vec{F} \Leftrightarrow \end{align}
\begin{align} L' = L + \Big(\frac{\partial L}{\partial \vec{r}} - \frac{d}{dt}( \frac{\partial L}{\partial \dot{\vec{r}}}) \Big) \cdot \epsilon \vec{F}+ \frac{d}{dt}( \frac{\partial L}{\partial \dot{\vec{r}}} \cdot \epsilon \vec{F}) \tag{3}\end{align}
The term after $L$ cancels out due to the Euler-Lagrange equation, therefore we are left with:
\begin{align} L' = L + \frac{d}{dt}( \frac{\partial L}{\partial \dot{\vec{r}}} \cdot \epsilon \vec{F}) \tag{4}\end{align}
Now, we know that the Equation of Motion is the same if we add a total time derivative to the Lagrangian (since the action changes by a constant), so this equation would imply that the equation of motion is unchanged, independent of $\vec{F}$. Now, this is obviously not correct, because for example the equation of motion is not the same in an accelerating frame of reference ($F(\vec{r}, t) = \vec{u} t^2/2$).
Even though it feels wrong, I can't seem to pinpoint where the mistake is. Perhaps someone could help me understand what went wrong.