Edit. Thanks to nfdc23 for pointing out a couple of corrections. As nfdc23 points out, these kinds of things are important in passing from a birational group law to a (regular) group law, so they may go back to Weil. Also, I vaguely remember something about some of this in SGA 3, so that might also be a reference.
As requested, I am posting my comments as an answer. I cannot quite remember who first proved these things, but it might have been Rosenlicht (I think that is where I learned them, anyway).
Let $G$ be a group scheme over $k$ (edit. and assume that $G$ is of finite type, and also assume that $k$ is perfect to avoid working over Artinian rings). Denote by $m:G\times_{\text{Spec}\ k} G \to G$ the multiplication morphism. Denote by $i:G\to G$ the group inverse morphism. Denote by $m':G\times_{\text{Spec}\ k}G \to G$ the composition $m\circ (i\circ\text{pr}_1,\text{pr}_2)$. For every dense open subscheme $U$ of $G$ (edit. and assume that $U$ is schematically dense), the morphism $$m'|_{U\times U}: U\times U \to G,$$ is surjective. This can be checked on geometric points. Thus, let $y\in G(\text{Spec}\ k)$ be an element. Since $U$ and $Uy^{-1}$ are both dense open subschemes of $G$, also $U\cap (Uy^{-1})$ is a dense open. For every geometric point $x$ in $U\cap (Uy^{-1})$, $x$ is in $U$ and $z=xy$ is also in $U$. Thus $(x,z)$ is in $U\times U$, and $m'(x,z)$ equals $y$. Therefore $m'|_{U\times U}$ is surjective.
Now let $H$ be a separated group scheme over $k$ with multiplication morphism $n:H\times_{\text{Spec}\ k}H\to H$. Let $U\subset G$ be a dense open subscheme. Let $\rho_U:U\to H$ be a $k$-morphism. On the dense open subscheme of $G\times_{\text{Spec}\ k} G$, $V=(U\times_{\text{Spec}\ k} U)\cap m^{-1}(U)$, assume that the composition $\rho_U\circ m|_V$ equals the composition $n\circ (\rho_U\times \rho_U)|_V$. Then there exists a unique morphism $\rho:G\to H$ that extends $\rho_U$, and this is a morphism of $k$-group schemes.
Since $H$ is separated and since $\rho_U$ is defined on a dense open, all extensions are unique if they exist. For the same reason, for the unique extension $\rho$, since $\rho_U\circ m|_V$ equals $n\circ (\rho_U\times \rho_U)|_V$, also $\rho\circ m$ equals $n\circ (\rho\times \rho)$. Thus, the unique extension is a morphism of $k$-group schemes. Thus, it suffices to prove that local extensions exist. Again, using uniqueness to confirm the cocycle condition for fpqc descent, it suffices to construct the extension after an fpqc base change.
Probably it is best to use directly the faithfully flat morphism $m'|_{U\times U}$. However, conceptually it is simpler to use the base change from $k$ to its algebraic closure. Then $U(k)$ is dense. Thus, there exist elements $x\in U(k)$ such that the translates $x^{-1}U$ cover $G$. On each open $x^{-1}U$, the unique extension of $\rho_U|_{U\cap (x^{-1}U)}$ is defined by $$\rho(y) = \rho_U(x)^{-1}\cdot \rho_U(xy)$$ (I am supressing $m$ and $n$ in this formula).