This requires writing selection attributes to a different domain than the Point domain. Note that for assigning/removing from vgroups the `adapt_domain` function is used implicitly by always looking up attributes from the Point domain: ".selection" may be stored on Curves and will automatically be adapted to points. For select-by-vgroup `adapt_domain` cannot be used because the selection has to be "greedy" (one point selects the whole curve). Pull Request: https://projects.blender.org/blender/blender/pulls/127799