Suppose we have a group $G$ with subgroups $H,H'$ and an isomorphism $\phi:H\to H'$. My question is when it is possible to extend $\phi$ to an automorphism on the whole group $G$? A slightly weaker version of this question would be to ask whether we can find any automorphism of $G$ which restricts to an isomorphism between $H$ and $H'$. Phrased differntly, for which groups is the answer to the above question yes for any choice of isomorphic subgroups?
A related question was asked in this post but no answer was provided there about which groups do have this lifting property.
Clearly this property holds for cyclic groups. In the example of the linked post they show that it does not hold for $S_4$, and a similar argument shows that it doesn't hold for $S_n, n\geq 4,n\neq 6$. Another example where this property fails is in the group $G := \mathbb{Z}/2 \times \mathbb{Z}/4$ as there is not automorphism which maps $\langle(1,0)\rangle$ to $\langle (0,2)\rangle$. I would really love a classification of the groups where this property holds, or at least a start towards that.
Edit: Thank you everyone for your helpful contributions. Since someone asked, here is a more precise characterization of what I'm looking for.
I'm most interested in groups $G$ which have the property that for any pair of isomorphic subgroups $H,H' \leq G$, there exists an automorphism $\rho$ of $G$ which restricts to an isomorphism $\rho\mid_H:H\to H'$.