[guided]The variational argument only shows that $v$ is orthogonal to weighted divergence-free perturbations. To turn that into a potential, we use the weighted Helmholtz decomposition in the Hilbert space $L^2(\rho_t;\mathbb R^n)$. Define
\begin{align*}
G_t
:=
\overline{\{\nabla\psi:\psi\in C_c^\infty(\mathbb R^n)\}}^{\,L^2(\rho_t;\mathbb R^n)}.
\end{align*}
Define the closed weighted divergence-free subspace
\begin{align*}
K_t
:=
\left\{
w\in L^2(\rho_t;\mathbb R^n):
\int_{\mathbb R^n}\nabla\psi(x)\cdot w(x)\,d\rho_t(x)=0
\text{ for every }\psi\in C_c^\infty(\mathbb R^n)
\right\}.
\end{align*}
The identity $K_t^\perp=G_t$ follows directly from the definitions. Indeed, $K_t$ consists exactly of those $w\in L^2(\rho_t;\mathbb R^n)$ that are orthogonal to every compactly supported gradient $\nabla\psi$, so $K_t=G_t^\perp$ because $G_t$ is the closed span of those gradients. Since $G_t$ is a closed subspace of the Hilbert space $L^2(\rho_t;\mathbb R^n)$, the identity $(G_t^\perp)^\perp=G_t$ gives $K_t^\perp=G_t$. The previous step proves
\begin{align*}
\int_{\mathbb R^n}v(x)\cdot w(x)\,d\rho_t(x)=0
\end{align*}
for every $w\in K_t$, so we obtain
\begin{align*}
v\in G_t.
\end{align*}
Being in $G_t$ means that there is a sequence
\begin{align*}
(\psi_k)_{k=1}^{\infty}\subset C_c^\infty(\mathbb R^n)
\end{align*}
with
\begin{align*}
\nabla\psi_k\to v
\end{align*}
in $L^2(\rho_t;\mathbb R^n)$. This is not yet the same as saying $v$ is literally a gradient. The point of the smoothness assumption is that we can upgrade the closed-gradient information into a curl-free condition. Fix a compact set $K\subset\mathbb R^n$. Since $r_t$ is smooth and strictly positive, it has a positive minimum on $K$:
\begin{align*}
m_K:=\inf_{x\in K}r_t(x)>0.
\end{align*}
Therefore
\begin{align*}
\int_K|\nabla\psi_k(x)-v(x)|^2\,d\mathcal L^n(x)
\le
\frac{1}{m_K}
\int_K|\nabla\psi_k(x)-v(x)|^2r_t(x)\,d\mathcal L^n(x),
\end{align*}
so $\nabla\psi_k\to v$ in $L^2_{\mathrm{loc}}(\mathbb R^n;\mathbb R^n)$.
Now gradients have zero curl, and this property passes to local $L^2$ limits in the distributional sense. Let $i,j\in\{1,\dots,n\}$ and let $\eta\in C_c^\infty(\mathbb R^n)$. Since $\nabla\psi_k\to v$ in $L^2$ on the compact support of $\eta$, the Cauchy-Schwarz inequality for the $L^2(\operatorname{supp}\eta,\mathcal L^n)$ pairing gives
\begin{align*}
\int_{\mathbb R^n}v_i(x)\,\partial_{x_j}\eta(x)\,d\mathcal L^n(x)
=
\lim_{k\to\infty}
\int_{\mathbb R^n}\partial_{x_i}\psi_k(x)\,\partial_{x_j}\eta(x)\,d\mathcal L^n(x).
\end{align*}
For each $k$, the mixed partial derivatives of the smooth function $\psi_k$ commute, and integration by parts gives
\begin{align*}
\int_{\mathbb R^n}\partial_{x_i}\psi_k(x)\,\partial_{x_j}\eta(x)\,d\mathcal L^n(x)=\int_{\mathbb R^n}\partial_{x_j}\psi_k(x)\,\partial_{x_i}\eta(x)\,d\mathcal L^n(x).
\end{align*}
Passing to the limit again yields
\begin{align*}
\int_{\mathbb R^n}v_i(x)\,\partial_{x_j}\eta(x)\,d\mathcal L^n(x)=\int_{\mathbb R^n}v_j(x)\,\partial_{x_i}\eta(x)\,d\mathcal L^n(x).
\end{align*}
This says $\partial_{x_j}v_i=\partial_{x_i}v_j$ as distributions. Because $v$ is smooth, the same equality holds pointwise. Hence the smooth one-form $\sum_{i=1}^n v_i\,dx_i$ is closed. Since $\mathbb R^n$ is contractible, the smooth Poincare lemma gives a smooth potential
\begin{align*}
\phi:\mathbb R^n\to\mathbb R
\end{align*}
such that $v=\nabla\phi$.[/guided]