Dehn twist in amalgamated product, preserving a subgroup
Let $A$ and $B$ be free of rank $2$ with $A = \langle a,c \rangle$ and $B = \langle b,c \rangle$, with $C = \langle c \rangle$ infinite cyclic. So $G$ is just the free group of rank $3$ with basis $a,b,c$.
Choose $h=c$ and $H = \langle c,ab \rangle$. Then $\tau(ab) = ac^{-1}bc \not\in H$.
This is more of a long comment than a definitive answer. Let’s assume that we have $x\in H$ of the form $x = ab$ where $a\in A-H$ and $b\in B-H$. Then
$$\tau(x) = \tau(a)\tau(b) = ah^{-1}bh$$
which is in $H$ exactly when $ah^{-1}b$ is in $H$. This would mean that there is some $g\in H$ so that $ah^{-1}b = g$ or that $b = ha^{-1}g$. This implies that $b\in (ha^{-1})H$. Note that since $b = a^{-1}x$ we know that $b\in a^{-1}H$.
Since cosets of $H$ form a partition, whether this is possible comes down to whether $(ha^{-1})H = a^{-1}H$, or whether $aha^{-1}\in H$. If $C$ is normal in $A$ or if $H$ is normal in $G$ then this is fine, but otherwise you could run into problems.