The underlying question is: how closely related are isomorphisms and automorphisms? More precisely, if $G_1$ and $G_2$ are given in terms of generating sets, when can we factor an isomorphism as an automorphism and an "obvious" map.

Let $H=\langle S\rangle$ be a fixed group, and let $G_1=H\ast_{A_1^{t_1}=B_1}$ and $G_2=H\ast_{A_2^{t_2}=B_2}$. Note that $G_1=\langle S, t_1\rangle$ and $G_2=\langle S, t_2\rangle$. If $\alpha:G_1\rightarrow G_2$ is an isomorphism then does there exists an automorphism $\beta\in\operatorname{Aut}(G_2)$ such that $\alpha$ factors as $\beta\circ \operatorname{id}$, where $\operatorname{id}: G_1\rightarrow G_2$ is the map with $\operatorname{id}(s)=s$ for all $s\in S$ and $\operatorname{id}(t_1)=t_2$.

In my precise setting, $H$ has Serre's property FA. Note that there are some subtleties here with respect to generating sets. For example, if $H=\mathbb{Z}$ then $BS(2, 3)=\langle a, t; t^{-1}a^2t=a^3\rangle$ is generated both by the pair $(a, t)$ and by $(a^2, t)$, but there is no automorphism of $BS(2, 3)$ which takes one pair to the other (this is the classical Baumslag-Solitar map, with non-trivial kernel). This observation is a subtlety rather than an outright obstruction though: $(a^2, t)$ is not given as an HNN-extension unlike in the question.