This question is related to this other post: I was wondering if proving that $ H \trianglelefteq G$ and $H\cap G^{\prime} =\{e\}$ (where $G^{\prime}$ denotes the commutator subgroup of $G$) implies that the elements of $H$ commute with the elements of $G^{\prime}$ is the same as proving that $H \trianglelefteq G$ and $H \cap G^{\prime}=\{e\}$ imply that $H \subseteq C(G)$ (where $C(G)$ is the center of $G$)? If not, is there a way to modify/extend this proof to show that $H \subseteq C(G)$? (It just needs to be a subset, not a subgroup).
If still not, how can I prove that$H \trianglelefteq G$ and $H \cap G^{\prime}=\{e\}$ imply that $H\subseteq C(G)$?
Thank you.