The transformation replacing an edge by a graph gadget is widely used in graph theory.
As an example, in an answer Marzio De Biasi subdivided edges which increases the girth while preserving GI.
A gadget $GA$ is a graph with two distinguished vertices $u,v$.
The transformation $G,GA \to G'$ is: replace edge $(x,y)$ in $G$ by a copy of the gadget $GA$ and in the copy set $u=x,v=y$ so $x,y$ from the original graph are the same in all copies.
Which gadgets $GA$ preserve isomorphism: $G \cong H \iff G' \cong H'$
Added to clarify
I am looking for an algorithm given $GA,u,v$ to decide if it preserves isomorphism or not (reductions to GI complete problems are allowed though better be avoided).
Added 2 I am interested when $GA$ is fixed (and possibly small).