Extending rational maps to semi-abelian varieties Setup. Let $k$ be an algebraically closed field of characteristic zero, and let $G/k$ be a semi-abelian variety i.e., $G$ is a commutative algebraic group which is an extension of an abelian variety $A/k$ by a torus $T/k$, so it admits the following presentation:
$$0 \to T \to G \to A \to 0$$
Let $Z/k$ be a smooth, integral variety and let $U\subset Z$ be a dense open such that $\text{codim}(Z\setminus U) \geq 2$.
Question. Is it true that any morphism of $k$-schemes $U\to G$ uniquely extends to a morphism $Z\to G$?
This result is stated in Lemma A.2 of Mochizuki's Topics in absolute anabelian geometry I: generalities and the proof goes as follows. First, he deduces the result when $G$ is proper i.e., $G$ is isomorphic to $A$. In this case the result is well-known and can be proved in a few different ways; one avenue of proof uses that $A$ does not contain any rational curves. Next, he says that we may reduce to the case where $G$ is isomorphic to a torus. Again, this result is well-known and follows from an application of Serre's normality criterion.
I understand the proofs of both cases, but I am struggling to see how to combine these to get the result for a general semi-abelian variety $G/k$. More precisely, I do not understand how one may reduce to the case where $G$ is a torus.
Edit. The answer to the question is yes, the result is true and actually holds in a more general setting by a theorem of Weil (see Bosch–Lütkebohmert–Raynaud's Néron Models, Theorem 4.4.1.). I would still like to understand how Mochizuki proposes to deduce the result for a general semi-abelian variety from only knowing this in the cases of an abelian variety and a torus.
Thanks!
 A: What you would like to say is that $G \cong A \times T$, which is obviously not quite true. But it is true smooth-locally, and that's enough to conclude.
Indeed, note that the quotient map $G \to A$ is faithfully flat with smooth fibres, hence smooth [Tag 01V8]. In fact, $G \times_A G \cong T \times G$ via $(g,h) \mapsto (g-h,g)$, and likewise $G \times_A G \times_A G \cong T \times T \times G$ (in two different ways ― see below).
We can uniquely extend the composition $U \to G \to A$ to $Z \to A$, which turns $Z$ into an $A$-scheme and gives a commutative diagram
$$\begin{array}{ccc}U & \hookrightarrow & Z \\ \downarrow & & \downarrow \\ G & \to & A.\!\end{array}$$
Pulling back along $G \to A$ gives the commutative diagram
$$\begin{array}{ccc} U \underset A\times G & \hookrightarrow & Z \underset A\times G \\ \downarrow & & \downarrow \\ G \underset A\times G & \to & G.\!\end{array}$$
Recalling that $G \times_A G \cong T \times G$ as schemes over $G$ (via the second projection), we get a map $U \times_A G \to T$ via the first projection. This uniquely extends to a map $Z \times_A G \to T$ since $U \times_A G \hookrightarrow Z \times_A G$ is an open immersion of smooth $k$-schemes (here we use that we are working smooth-locally and not just fppf-locally!). This gives a diagonal arrow in the diagram above:
$$\begin{array}{ccc} U \underset A\times G & \hookrightarrow & Z \underset A\times G \\ \downarrow & \swarrow & \downarrow \\ T \times G & \to & G,\!\end{array}$$
where the top triangle commutes since it does so after composing with the first and second projections $T \times G \to T$ (this is the extension property) and $T \times G \to G$ (this was given), and the bottom triangle commutes because everything is a morphism over $G$.
To see that $Z \times_A G \to G \times_A G$ descends to $Z \to G$, we need to check the cocycle condition that the two pullbacks along $(-) \times_A G \times_A G \rightrightarrows (-) \times_A G$ agree; see [Tag 023Q] for details. But they do so above the dense open $U \subseteq Z$ and $G \times_A G \times_A G \cong T \times T \times G$ as schemes over $G$ (via the last projection), so the uniqueness statement for morphisms to $T \times T$ (which just follows since everything is separated) shows that they agree everywhere.
So $Z \times_A G \to G \times_A G$ descends to $Z \to G$, and by construction the restriction to $U$ is the map $U \to G$ we started with. $\square$
