Is the center of a 2-generated finite metabelian group determined by the representation of the abelianization on its derived subgroup? Let $G_1,G_2$ be 2-generated finite metabelian groups with abelianizations $A$ and derived subgroups isomorphic as $\mathbb{Z}[A]$-modules.
Could $Z(G_1),Z(G_2)$ have different sizes? Could they be nonisomorphic?
 A: Yes, let $G_1 = \mathtt{SmallGroup}(64,19)$ and $G_2 = \mathtt{SmallGroup}(64,20)$ in the small groups database. They are both $2$-generator metabelian with derived group cyclic of order $4$ and abelianization $C_4 \times C_4$, but $|Z(G_1)|=4$ and $|Z(G_2)|=8$.
They have presentations $$G_1 = \langle x,y,z \mid x^4=y^4=z^4=1, [x,y]=z, [x,z]=[y,z]=1 \rangle$$ and
$$G_2= \langle x,y \mid x^4=y^4=z^4=1, [x,y]=z, [x,z]=z^2, [y,z]=1 \rangle.$$
Note that $G_1$ has nilpotency class $2$ and $G_2$ has class $3$.
$\mathbf{Added\ later}$: This example does not satisfy the required condition that $G_1'$ should have the same structure as $G_2'$ as a $G/G'$-module. That condition forces both groups to have the same nilpotency class. I have not yet found an example satisfying that condition where $|Z(G_1)| \ne |Z(G_2)|$. But it is not hard to find examples in which the centres are not isomorphic.
The two groups $G_1 = \mathtt{SmallGroup}(16,3)$ and $G_2 = \mathtt{SmallGroup}(16,6)$ both have abelianization $C_4 \times C_2$, derived group of order $2$, and centre of order $4$, but $G_2$ has cyclic centre and $G_1$ does not.
$$G_1 = \langle a,b,c \mid a^2=b^4=c^2=[a,c]=[b,c]=1, b^a=bc \rangle$$
$$G_2 = \langle a,b \mid a^2=b^8=1, b^a=b^5 \rangle.$$
