Derived subgroup not is intermediately powering-invariant in nilpotent group

Statement
It is possible to have a nilpotent group $$G$$ such that the derived subgroup $$G' = [G,G]$$ is not an intermediately powering-invariant subgroup inside $$G$$. In other words, there exists a subgroup $$H$$ of $$G$$ such that $$G' \le H$$ and such that $$G'$$ is not a powering-invariant subgroup of $$H$$.

Proof
If we take $$G$$ to be the group indicated above, namely the central product of $$UT(3,\mathbb{Z})$$ and $$\mathbb{Q}$$ identifying the center of the former with Z in Q inside the latter:


 * $$G'$$ is the shared subgroup $$\mathbb{Z}$$.
 * Take $$H$$ to be the second factor $$\mathbb{Q}$$, viewed as a subgroup. Note that $$H = Z(G)$$ is the center of $$G$$.
 * $$G'$$, viewed as a subgroup of $$H$$, is like Z in Q, and it is clearly not a powering-invariant subgroup.