  Let $G_1$ and $G_2$ be compact Lie groups, $X_1 \in \mathfrak{g}_1$, $X_2 \in
\mathfrak{g}_2$ and consider the operator \begin{equation*} L_{aq} = X_1 +
a(x_1)X_2 + q(x_1,x_2), \end{equation*} where $a$ and $q$ are
ultradifferentiable functions in the sense of Komatsu, and $a$ is real-valued.
We characterize completely the global hypoellipticity and the global
solvability of $L_{aq}$ in the sense of Komatsu. For this, we present a
conjugation between $L_{aq}$ and a constant-coefficient operator that preserves
these global properties in Komatsu classes. We also present examples of
globally hypoelliptic and globally solvable operators on $\mathbb{T}^1\times
\mathbb{S}^3$ and $\mathbb{S}^3\times \mathbb{S}^3$ in the sense of Komatsu. In
particular, we give examples of differential operators which are not globally
$C^\infty$-solvable, but are globally solvable in Gevrey spaces.
