The setting described in that paper is an instance of a so-called “Type-II pairing” with an efficient isomorphism $G_2\to G_1$. Most efficient pairing constructions are “Type-III”, where such an isomorphism is believed not to exist. So if you take a normal implementation of the BLS12 bilinear group, this won't work: ignoring twists, you can indeed compute the trace map as mentioned, but the $G_2$ subgroup is specifically chosen to map to zero, so it won't be an isomorphism.
To be a bit more precise, the construction of bilinear pairings looks like this. We start with an elliptic curve $E/\mathbb{F}_q$ such that the $p$-torsion subgroup $E[p](\mathbb{F}_q)$ (points of order dividing $p$ with coordinates in $\mathbb{F}_q$) is cyclic of order $p$, and such that moreover, over some small degree extension $\mathbb{F}_{q^d}$, $E$ has full $p$-torsion (i.e., $E[p](\mathbb{F}_{q^d})$ is isomorphic to $(\mathbb{Z}/p\mathbb{Z})^2$: there are $p^2$ points with coordinates in $\mathbb{F}_{q^d}$ and order dividing $p$). We can then choose $E[p](\mathbb{F}_{q^d})$ as $G_1$, and any of the other $p$ subgroups of order $p$ of $E[p](\mathbb{F}_{q^d})$ as $G_2$.
Now, as described in the paper, the trace map is a homomorphism of $E[p](\mathbb{F}_{q^d})$ onto $G_1$, so the usual choice of $G_2$ is to take the kernel of this map. This allows all sorts of optimizations of the construction, makes it possible to hash to $G_2$ and so on and so forth, but it is precisely incompatible with the setting required in that paper. What you would do for that paper is choose one of the remaining $p-1$ choices for $G_2$ (or more likely: modify the construction in order to avoid the less efficient Type-II setting; there exist automatic conversion tools that take a primitive defined in one setting and formally construct a corresponding primitive in another setting, so this should be possible here, although the security argument might need to be adapted normally).