Characteristic submonoid of nilpotent group not implies subgroup

Statement
It is possible to have a nilpotent group $$G$$ (in fact, we can choose $$G$$ to be a group of nilpotency class two) and a characteristic submonoid $$M$$ of $$G$$ that is not a subgroup of $$G$$.

Similar facts

 * Characteristic submonoid of group not implies subgroup

Opposite facts

 * Nonempty finite subsemigroup of group is subgroup: Any finite nonempty subsemigroup of a group is a subgroup. More generally, for a periodic group, i.e., a group where every element has finite order, any nonempty subsemigroup is a subgroup.
 * Nonempty characteristic subsemigroup of abelian group implies subgroup: For an abelian group, any characteristic submonoid, and more generally, any nonempty characteristic subsemigroup, must be a subgroup. This is because the inverse map is an automorphism for Abelian groups.

Proof
Suppose $$G$$ is the Zalesskii group. We know that:


 * $$G$$ is a nilpotent group in which every automorphism is inner (see there exist infinite nilpotent groups in which every automorphism is inner for the proof). This means that every element in the center of $$G$$ is fixed by every automorphism. In particular, every submonoid of the center of $$G$$ is a characteristic submonoid of $$G$$.
 * The center of $$G$$ is isomorphic to the group of rational numbers with square-free denominators. Most importantly, it has element of infinite order.

Take $$M$$ to be the submonoid of $$G$$ generated by a central element of infinite order. By the above observations, $$M$$ is a characteristic submonoid of $$G$$.