The answer is **yes $\alpha$ is one-to one in any case**.

We first build an arrow
$$
\rho\ :\ T(\mathfrak{g})\to T(\mathfrak{g}_1)\otimes T(\mathfrak{g}_2)
$$
by straightening the inversions. In order not to confuse strings with numbers, we reindex $\mathfrak{g}_1=\mathfrak{g}_a$ and $\mathfrak{g}_2=\mathfrak{g}_b$ where $a<b$ are two symbols. Using the decomposition in

Bourbaki, Algebra Chapter III § 5.5, one gets
$$
T(\mathfrak{g})=\oplus_{w\in \{a,b\}^*}\,T_w
$$
where $\{a,b\}^*$ is the set of words in the symbols $\{a,b\}$ (the free monoid generated by $\{a,b\}$) i.e. mappings
$$
\{1,\cdots n\}\ni i\mapsto w[i]\in \{a,b\}
$$
($n$ is the length of the word and, if $n=0$, one gets the empty word i.e. the unit of the free monoid).
For each word having an inversion at place "$i$" i.e. $w=p\,ba\,s$ where $|p|=i-1$, we have the rewrite rule
$$
\begin{eqnarray}
&&r_{w,i}(g_{w[1]}\otimes\ldots \otimes g_b\otimes g_a\otimes\ldots g_{w[n]})=\cr
&&g_{w[1]}\otimes\ldots \otimes [g_b,g_a]_1\otimes\ldots g_{w[n]}+\cr
&&g_{w[1]}\otimes\ldots \otimes [g_b,g_a]_2\otimes\ldots g_{w[n]}+\cr
&&g_{w[1]}\otimes\ldots \otimes g_a\otimes g_b\otimes\ldots g_{w[n]}\cr
&& \in T_{p\,a\,s}\oplus T_{p\,b\,s}\oplus T_{p\,ab\,s}
\end{eqnarray}
$$
(where $[g,h]_i:=p_i([g,h])$, $p_i$ being the projector on the summands of the decomposition $\mathfrak{g}=\mathfrak{g}_1\oplus\mathfrak{g}_2$) if the indexing word has no inversion at place ``$i$'', $r_{w,i}$ acts trivially (as identity). It is not difficult to check that this system (as usual $r_{w,i}$ is extended to $T(\mathfrak{g})$ by identity to other summands) is confluent (as, if there are two inversions, the indexing word must be of the form
$w=p\,ba\,u\,ba\,s$) and noetherian (as the rules reduce either length or number of inversions). So, the linear map $\rho$ which sends any tensor to its normal form

- is a projector
- its image is $\oplus_{w\in \{a,b\}^*_{irr}}\,T_w=T(\mathfrak{g}_1)\otimes T(\mathfrak{g}_2)$
($\{a,b\}^*_{irr}$ being the set of words without inversion i.e. $a^*b^*=\{a^pb^q\}_{p,q\geq 0}$)
- its kernel is the submodule generated by the differences $t-r_{w,i}(t)$
- due to the rewriting properties, one has
$$
\rho(u\otimes \rho(v)\otimes w)=\rho(u\otimes v\otimes w)
$$

From now on, we return to the original labeling $\mathfrak{g}=\mathfrak{g}_1\oplus\mathfrak{g}_2$.

Restricting $\rho$ to its image, we get a surjection (still called $\rho$ here)
$$
\rho\ :\ T(\mathfrak{g}) \rightarrow T(\mathfrak{g}_1)\otimes T(\mathfrak{g}_2)
$$
and the factor embedding
$$
j\ :\ T(\mathfrak{g}_1)\otimes T(\mathfrak{g}_2)\hookrightarrow T(\mathfrak{g})
$$
is a section of it. Together with point (4) above, this suffices to prove that there exists a (unique) law of algebra (associative with unit, AAU in the sequel) on $T(\mathfrak{g}_1)\otimes T(\mathfrak{g}_2)$ (call it $*$) such that $\rho$ is a morphism (of AAU), this law reads
$t_1*t_2:=\rho(j(t_1)\otimes j(t_2))$ and (we identify $t$ and $j(t)$)
$$
(t_1*t_2)*t_3=\rho(\rho(t_1\otimes t_2)\otimes t_3)=
\rho(t_1\otimes t_2\otimes t_3)=t_1*(t_2*t_3)
$$

then the kernel of $\rho$ is a two sided ideal which contains all the elements (with $(g_2,h_1)\in \mathfrak{g}_2\times \mathfrak{g}_1$)
$$
B(g_2,h_1)=g_2\otimes h_1 - h_1\otimes g_2 - [g_2,h_1]\ .
$$
By composition, we now have a linear morphism $\beta_0=(s_1\otimes s_2)\circ\rho$
$$
T(\mathfrak{g}) \stackrel{\rho}{\rightarrow} T(\mathfrak{g}_1)\otimes T(\mathfrak{g}_2)
\stackrel{s_1\otimes s_2}{\longrightarrow} \mathcal{U}(\mathfrak{g}_1)\otimes\mathcal{U}(\mathfrak{g}_2)
$$
where $s_i$ is the canonical surjection $T(\mathfrak{g}_i)\to \mathcal{U}(\mathfrak{g}_i)$. Let us show now that the kernel of $s:T(\mathfrak{g})\to \mathcal{U}(\mathfrak{g})$ is included in $ker(\beta_0)$, so that we could factorize $\beta_0$ through $\mathcal{U}(\mathfrak{g})$ as follows.

$$
\require{AMScd}
\begin{CD}
T(\mathfrak{g}) @>{\rho}>>T(\mathfrak{g}_1)\otimes T(\mathfrak{g}_2)\\
@V{s}VV @VV{s_1\otimes s_2}V \\
\mathcal{U}(\mathfrak{g}) @>{\beta}>> \mathcal{U}(\mathfrak{g}_1)\otimes\mathcal{U}(\mathfrak{g}_2)
\end{CD}
$$
Let us prove that this last diagram is admissible.

We know that $\mathcal{J}=ker(s)$ is the two sided ideal generated by the elements $\{B(g,h)\}_{g,h\in \mathfrak{g}}$ where
$$
B(g,h)=g\otimes h - h\otimes g - [g,h]
$$
As $\mathfrak{g}=\mathfrak{g}_1\oplus\mathfrak{g}_2$ and $B(-,-)$ is bilinear antisymmetric it amounts to the same to split the family in three relators
$$
\{B(g_1,h_1)\}_{g_1,h_1\in \mathfrak{g}_1}\cup \{B(g_2,h_2)\}_{g_2,h_2\in \mathfrak{g}_2}\cup
\{B(g_2,h_1)\}_{(g_2,h_1)\in \mathfrak{g}_2\times \mathfrak{g}_1}
$$
Calling $\mathcal{J}_{ij}$ be the corresponding (two-sided) ideals, we have already shown that
$$
\mathcal{J}_{21}\subset ker(\rho)\subset ker(\beta_0)
$$
The fact that $\mathcal{J}_{11}\subset ker(\beta_0)$ is a consequence of the following identity (for $g_2\in \mathfrak{g}_2$ and $g_1,h_1\in \mathfrak{g}_1$)
$$
g_2\otimes B(g_1,h_1)\equiv_\rho B([g_2,g_1]_1,h_1)+B(g_1,[g_2,h_1]_1)+ B(g_1,h_1)\otimes g_2\qquad (*)
$$
where $\equiv_\rho$ means the equivalence modulo $ker(\rho)$.

One shows very similarly that $\mathcal{J}_{22}\subset ker(\beta_0)$, hence the square diagram above. Computing on generators shows that $\alpha$ and $\beta$ are mutually inverse.

**Remarks** i) The same proof seems to show that, in case
$$
\mathfrak{g}=\mathfrak{g}_1\oplus \mathfrak{s}
$$
where $\mathfrak{s}$ is some submodule, then the arrow
$$
\alpha\ :\ \mathcal{U}(\mathfrak{g_1})\otimes \mathcal{A}(\mathfrak{s})\to \mathcal{U}(\mathfrak{g})
$$
(where $\mathcal{A}(\mathfrak{s})$ is the subalgebra generated by $\mathfrak{s}$) is one-to-one.

ii) Generalizing the straightening process to $|I|<+\infty$, and taking into account the ambiguities (squares and hexagons), it seems true that, for any decomposition
$$
\mathfrak{g}=\oplus_{i\in I}\, \mathfrak{g}_i
$$
(equality is as $R$-modules but any individual $\mathfrak{g}_i$ is a Lie subalgebra), the ($I$ being linearly ordered) multiplication map (only linear)
$$
\stackrel{\rightarrow}{\otimes}_{i\in I}\mathcal{U}(\mathfrak{g}_i)
\stackrel{\alpha}{\longrightarrow} \mathcal{U}(\mathfrak{g})
$$
is one-to-one. However the construction and proofs seem considerably more difficult.

iii) If $I$ is infinite, one first constructs
$\stackrel{\rightarrow}{\otimes}_{i\in I}\mathcal{U}(\mathfrak{g}_i)$ as in Bourbaki Algebra Chapter III § 4.5 using the unities but **not** the algebra structure. We can, again, ask the same question.

Please do not hesitate to interact if something is wrong or unclear !

**Late edit** i) *Proof of identity* $(*)$.

Let us use two derivations within $T(\mathfrak{g})$ defined on the generators $g\in \mathfrak{g}$ by
$$
ad_{g_2}^{\otimes}(g):=g_2\otimes g-g\otimes g_2=[g_2,g]_{\otimes}
\ ;\ ad_{g_2}(g):=[g_2,g]
$$
then, for $g_2\in \mathfrak{g}_2$ and because, for $u\in\mathfrak{g}_1$,
$ad_{g_2}^{\otimes}(u)\equiv_\rho ad_{g_2}(u)$,

$$
\begin{eqnarray}
&& ad_{g_2}^{\otimes}(B(g_1,h_1))=ad_{g_2}^{\otimes}([g_1,h_1]_{\otimes}-[g_1,h_1])\cr
&&=[[g_2,g_1]_{\otimes},h_1]_{\otimes}+[g_1,[g_2,h_1]_{\otimes}]_{\otimes}-
ad_{g_2}^{\otimes}([g_1,h_1])\cr
&&\equiv_\rho [[g_2,g_1]_{\otimes},h_1]_{\otimes}+[g_1,[g_2,h_1]_{\otimes}]_{\otimes}-
ad_{g_2}([g_1,h_1])\cr
&&\equiv_\rho [[g_2,g_1],h_1]_{\otimes}+[g_1,[g_2,h_1]]_{\otimes}-
[[g_2,g_1],h_1]-[g_1,[g_2,h_1]]\cr
&&\equiv_\rho B([g_2,g_1],h_1)+B(g_1,[g_2,h_1])\cr
&&\equiv_\rho B([g_2,g_1]_1,h_1)+B(g_1,[g_2,h_1]_1)\cr
\end{eqnarray}
$$

ii) *Proof of $\mathcal{J}_{11}\subset ker(\beta_0)$*

The two-sided ideal $\mathcal{J}_{11}$ is linearly generated by the elements
$$
s=u_1\otimes B(g_1,h_1)\otimes u_2
$$
with $g_1,h_1\in \mathfrak{g}_1$ and $u_i\in T_{w_i}$

We first rewrite each $u_i$ with $\rho$ and get that the two-sided ideal $\mathcal{J}_{11}$ is linearly generated by elements of the form
$$
t\equiv_\rho t_1\otimes t_2 \otimes B(g_1,h_1)\otimes t_3\otimes t_4
$$
with $t_1\in T_{a^p},\ t_2\in T_{b^q},\ t_3\in T_{a^r},\ t_4\in T_{b^s}$.

If $q>0$, we have $t_2=t'_2\otimes g_2$, for some $g_2\in \mathfrak{g}_2$

then using identity $(*)$ , one has
$$
t\equiv_\rho t_1\otimes t'_2 \otimes \Big(
B([g_2,g_1]_1,h_1)+B(g_1,[g_2,h_1]_1)+B(g_1,h_1)\otimes g_2\Big)\otimes t_3\otimes t_4
$$
using a recurrence on $q$, one gets
$$
t\equiv_\rho t_1\otimes \Big(\sum_{i=1}^{q} B(x_i,y_i)\otimes v_i\otimes t_3\otimes t_4\Big)
$$
with $x_i,y_i\in \mathfrak{g}_1$ and $v_i$ in some $T_{w_i}$. Now
$$
t\equiv_\rho \Big(\sum_{i=1}^n t_1\otimes B(x_i,y_i)\otimes \rho(v_i\otimes t_3\otimes t_4)\Big)
$$
applying $\beta_0$ (which is compatible with $\equiv_\rho$) to both members, we have
$$
\beta_0(t)=\beta_0\Big(\sum_{i=1}^n t_1\otimes B(x_i,y_i)\otimes \rho(v_i\otimes t_3\otimes t_4)\Big)=0
$$