Given a connected graph of groups $\mathcal G$ (where edge maps are embeddings), by a subgraph we mean a graph of groups obtain by omitting some vertices, some edges, and replacing the remaining vertex groups by some subgroups containing the remaining embedded edge groups (which includes the possibility of leaving some as-is).
Suppose $y_0$ is a vertex of $\mathcal H$ and $x_0$ is the corresponding vertex of $\mathcal G$. Then we have a natural homomorphism $\pi_1(\mathcal H,y_0)\to \pi_1(\mathcal G,x_0)$.
What are some natural sufficient conditions on $\mathcal H$ for this to be an embedding? Is there a more general fact that tells us when it happens? I'm also interested in references.
A non-example following a suggestion by Andy Putman in another (now deleted) question of mine is the following: let $G$ be a non-trivial group and consider a graph of groups with three vertices of order $2$ with vertex group $G$, two edge groups $G$ (with isomorphisms as edge map) and one trivial edge group.
Then deleting a vertex corresponding to the $G$ with two isomorphisms yields $G*G$ as the fundamental group, which maps to $G\leq G*\mathbf Z$ in the fundamental group of the whole graph.