Background
We are given two directed graphs that can have cycles in them, let's call them $G_1$ and $G_2$, where we have a restriction function $(\mid)$ that takes $G_1$ and an argument and returns a restricted graph such that it's isomorphic to $G_2$. For instance, the restricted $G_1 | X$ and $G_X$ are isomorphic.
Example
For example, vertices of $G_1$ are of this form: $X.a$, $X.b$ and $Y.a$ and $Y.b$ and vertices of $G_2$ are of this form: $a$ and $b$ so if we "restrict" the $G_1$ graph by $X$ we get a new graph that has only vertice that starts with $X$ and remove the prefix, we get vertices that match vertices in $G_2$
What we want to prove
Now we want to prove that if we apply transitive closure on $G_1$ then its restricted form is still isomorphic to $G_2$.
Is it a graph isomorphism problem?
The formal definition of graph isomorphism says that we must guess the function that maps the vertices between two graphs but this function is known to us (we just need to restrict the vertice by filtering out the vertices that start with the parameter and and removing the prefix, see above example):
$G,H$ are isomorphic if there is a bijection $f: V(G) \to V(H)$ such that a directed edge $(u,v)$ exists in $G$ if and only if the edge $(f(u), f(v))$ exists in $H$.
So I need some help or hints on how to prove this. Thank you.