The correct Gauge transformation formula should be
$$\begin{aligned} \mathbf A &\mapsto \mathbf A + \nabla \lambda \\
\mathbf V &\mapsto V - \frac{\partial\lambda}{\partial t}, \end{aligned} $$
not something with "gradL/dt". The Coulomb gauge requires $\nabla\cdot\mathbf A=0$, not "rotA = 0". The Lorenz gauge requires $\nabla\cdot\mathbf A + \frac1{c^2}\frac{\partial V}{\partial t}=0$, not "gradA+1/c^2 dV/dt".
The Coulomb gauge can be chosen by solving the Poisson equation
$$ \nabla^2 \lambda = -\nabla\cdot\mathbf A$$
The Lorenz gauge can be chosen by solving the inhomogeneous wave equation
$$ \nabla^2 \lambda - \frac1{c^2}\frac{\partial^2\lambda}{\partial t^2} = -\nabla\cdot\mathbf{A} - \frac1{c^2}\frac{\partial{V}}{\partial{t}}$$
(Substitute the transformed potentials into the conditions to get the PDEs)
Existence of solutions of these PDEs are guaranteed as long as the source terms (stuff on the RHS) are "well-behaved" (e.g. $\nabla\cdot\mathbf A$ should grow slower than $1/r$ in the Poisson equation)
given I perform a gauge transformation:
$(\vec{A},\phi)->(\vec{A'},\phi')$
Such that,
$\vec{A'} = \vec{A} + \nabla f$
$\phi' = \phi - \frac{\partial f}{\partial t}$
The new potentials, $\vec{A'},\phi'$, Leave the field invariant.
Performing the actual gauge transformation would change the potentials in the potential formulation of maxwell equation to be $\vec{A'}$ and $\phi'$
Suppose further, that aswell as leaving the field invariant, we would also like the new potentials $\vec{A'},\phi'$
To satisfy the condition that :
$\nabla \cdot \vec{A'} + \mu_0 \epsilon_0 \frac{\partial \phi'}{\partial t} = 0$
Thus, by substituting the definition of $\vec{A'},\phi'$ into the lorenz gauge condition. We are essentially saying this: Given the potentials $\vec{A'},\phi'$ satisfy the lorenz gauge condition, AND they are in a form that leaves the field invariant. What should the function "f" be?
If we can prove than an "f" exists given the previous 2 statements, then we have shown that:
Given the potentials $\vec{A'},\phi'$ satisfy the lorentz gauge condition, they can be written in a form that leaves the field invariant. Aka, we can prescribe the divergence of $\vec{A'}$ to follow the lorenz gauge condition. And the potentials still gives the correct E,B field.
Let's solve for the function F, to prove that F exists!
$\nabla \cdot \vec{A'} + \mu_0 \epsilon_0 \frac{\partial \phi'}{\partial t} = 0$
Sub in:
$(\vec{A'} = \vec{A} + \nabla f$),
$(\phi' = \phi - \frac{\partial f}{\partial t})$
$\nabla \cdot ( \vec{A} + \nabla f ) + \mu_0 \epsilon_0 \frac{\partial }{\partial t}(\phi - \frac{\partial f}{\partial t}) = 0$
$\nabla \cdot \vec{A} + \nabla^2 f + \mu_0 \epsilon_0 \frac{\partial \phi }{\partial t}-\mu_0\epsilon_0 \frac{\partial^2 f}{\partial t^2} = 0$
$\nabla^2 f -\mu_0\epsilon_0 \frac{\partial^2 f}{\partial t^2} = -(\nabla \cdot \vec{A} + \mu_0 \epsilon_0 \frac{\partial \phi}{\partial t})$
note the function on the right isn't the same as what you have gotten.
This IS a solvable equation( "inhomogenous wave equation"). meaning F exists. Meaning the potentials can be written in a form that leaves the field invariant whilst also satisfying the lorenz gauge condition.
To answer your question more directly, this is the conditions on F such that the new potentials satisfy the lorenz gauge
Best Answer
Comment to the question (v1): It seems OP is conflating, on one hand, a gauge transformation
$$ \tilde{A}_{\mu} ~=~ A_{\mu} +d_{\mu}\Lambda $$
with, on the other hand, a gauge-fixing condition, i.e. choosing a gauge, such e.g., Lorenz gauge, Coulomb gauge, axial gauge, temporal gauge, etc.
A gauge transformation can e.g. go between two gauge-fixing conditions. More generally, gauge transformations run along gauge orbits. Ideally a gauge-fixing condition intersects all gauge orbits exactly once.
Mathematically, depending on the topology of spacetime, it is often a non-trivial issue whether such a gauge-fixing condition is globally well-defined and uniquely specifies the gauge-field, cf. e.g. the Gribov problem. Existence and uniqueness of solutions to gauge-fixing conditions is the topic of several Phys.SE posts, see e.g. this and this Phys.SE posts.