Is there some kind of "set parent" method to "move" a Group inside a container?

To ‘Move’ a group into another context and keep all of its original ‘properties’ - so it appears you have haven’t actually ‘Copied’ it - you make references to them apply them to the new ‘instance’, then erase the original group…

grp ### the reference to the original group
newgrp = cdef.entities.add_instance( grp.entities.parent, grp.transformation )
newgrp.material = grp.material
newgrp.layer = grp.layer =
attds = grp.attribute_dictionaries
  n =
  d.each_pair{|k, v|
    newgrp.set_attribute(n, k, v)
} if attds
### you can also transfer any other properties like hidden?, locked? etc