The question is basically the subject. I have found references in the case of simply-connected algebraic groups (the field is arbitrary, the group is not necessarily affine):
Popov, Picard groups of homogeneous spaces of linear algebraic groups and one-dimensional homogeneous vector bundles.
The fact that $\mathcal{O}(G)$ is factorial in the case of simply-connected groups follows from the fact that $\text{Pic}(G) = 0$. What if the group is not simply-connected?
Any references and thoughts would be appreciated.
The answer is no: a semi-simple algebraic group $G$ over a field $k$ has the property that $A_G:=\mathcal{O}_G(G)$ is a UFD if and only if $G$ is simply connected.
First observe that as $G$ is smooth over $k$, it is a domain (as it is connected) it is regular and thus locally factorial and normal. So, by [Hartshorne, II.6.16] we have that $\mathrm{Pic}(G)=\mathrm{Cl}(G)$, an thus by [Hartshorne, II.6.2] we have that $A_G$ is a UFD if and only if $\mathrm{Pic}(G)=0$. The claim then follows from the following fact.
Let me explain this notation:
Remark 1:
The intuition for this fact is actually quite simple if you take the following (non-obvious) fact as given: $\mathrm{Pic}(G)$ is torsion (in fact it's finite -- for instance, the sketch below even shows this once you know that $\pi_1(G)$ is finite). In this case, it then comes in the case when $k$ is algebraically closed of chraracteristic $0$ (and for general characteristic $0$ fields by Galois descent) from combining the following facts:
Indeed, from these three facts we see that we get the equality
$$\mathrm{Pic}(G)[n]=\mathrm{Hom}(\pi_1(G),\mathbb{Z}/n\mathbb{Z}),$$
and passing to the limit over all $n$ gives the result.
Remark 2:
References:
[Harsthorne] Hartshorne, Robin. Algebraic geometry. Vol. 52. Springer Science & Business Media, 2013.
[Milne] Milne, James S. Algebraic groups: the theory of group schemes of finite type over a field. Vol. 170. Cambridge University Press, 2017.