No vertex groups on vertices on evaluated object
Preserve all layers

By default it preserve all layers is turned off when using to_mesh on the evaluated object, set it to True

Test in console, Default cube, default subsurf modifier, 3 vertex groups. (All verts in vgroup 0, a single in groups 1 and 2)

&gt;&gt;&gt; dg = C.evaluated_depsgraph_get()
&gt;&gt;&gt; me = C.object.data
&gt;&gt;&gt; len(me.vertices)
8

&gt;&gt;&gt; for v in me.vertices:
...     [g.group for g in v.groups]
...     
[0]
[0]
[0]
[1, 0]
[0]
[0]
[0]
[2, 0]


Using Object.evaluated_get

&gt;&gt;&gt; o = C.object.evaluated_get(dg)
&gt;&gt;&gt; eme = o.to_mesh(preserve_all_data_layers=True, depsgraph=dg)
&gt;&gt;&gt; for v in eme.vertices:
...     [g.group for g in v.groups]
...     
[0]
[0]
[0]
[1, 0]
[0]
[0]
[0]
[2, 0]
[0]
[0]
[1, 0]
[0, 1]
[0]
[2, 0, 1]
[0, 2]
[0]
[0, 2]
[0]
[0]
[0]
[1, 0]
[2, 1, 0]
[2, 0]
[0]
[0]
[1, 0, 2]


Bmesh from object

The method outlined here also preserves the vertex groups.

get the evaluated bmesh, write to a mesh, count the verts and check for vert group assignments.. (prob should have put vert index and  weight test in too, but you get the gist)

&gt;&gt;&gt; bm = bmesh.new()
&gt;&gt;&gt; bm.from_object(C.object, dg)
&gt;&gt;&gt; bm.to_mesh(D.meshes.new("Test"))
&gt;&gt;&gt; len(D.meshes["Test"].vertices)
26

&gt;&gt;&gt; for v in D.meshes["Test"].vertices:
...     [g.group for g in v.groups]
...     
[0]
[0]
[0]
[1, 0]
[0]
[0]
[0]
[2, 0]
[0]
[0]
[1, 0]
[0, 1]
[0]
[2, 0, 1]
[0, 2]
[0]
[0, 2]
[0]
[0]
[0]
[1, 0]
[2, 1, 0]
[2, 0]
[0]
[0]
[1, 0, 2]