Such computations are indeed not formal; and virtually impossible if one tries to compute directly from the definitions.

The starting point here is that $f$ is actually cohomologically smooth. More precisely, $g: \ast\to BG$ is cohomologically smooth, as it pulls back to the smooth map $G\to \ast$; and thus $BG\to \ast$ is cohomologically smooth-locally cohomologically smooth (as the composite $\ast\to BG\to \ast$ is evidently smooth), and hence cohomologically smooth.

Thus, $f^!$ is $f^\ast$ up to twist. The next task is to identify the twist. Let's first figure out the degree. Note that $g^! f^!(1)=1$ and $g^! f^!(1) = g^\ast f^!(1)\otimes g^!(1)$. This means that the shifts in $f^!$ and $g^!$ must cancel. But $g^!$ shifts by $\mathrm{dim}(G)$ to the left, so $f^!(1)$ must sit in cohomological degree $\mathrm{dim}(G)$. In that degree, it gives a $1$-dimensional representation of $G$ on a $\mathbb Q$-vector space, but as $G$ is connected, it cannot act on it, so $f^!(1)\cong 1[-\mathrm{dim}(G)]$.

(In general, computing dualizing complexes is best done via degeneration to the normal cone, as I learned from Clausen. This works in virtually all situations.)

Now $f_!$ is the left adjoint of $f^!$. As $f^!\cong f^\ast[-\mathrm{dim}(G)]$, we learn that $f_!$ is $f_\natural[\mathrm{dim}(G)]$ where $f_\natural$ denotes the left adjoint of $f^\ast$. In classical language, $f_\natural$ computes group homology. Thus, $f_!\mathbb Q$ is the group homology of $G$ shifted by $\mathrm{dim}(G)$ to the left.