bmesh.ops.subdivide_edges mucking up
Replace the me.update with bmesh.update_edit_mesh(me)
Made a MWE from question code and tested on default cube with a single face in vertex group named &quot;Group&quot;.
Recommend adding imports and a default dummy setting, which will make it easier for answerers to test, answer.
An edit mode bemsh is &quot;bound&quot; to the mesh and rarely likes it if you try and do anything to the underlying mesh data while it is active.
import bpy
import bmesh

class  SUBDIVIDE_OT_Vertexgroup(bpy.types.Operator):

    bl_idname = &quot;subdivide.vertexgroup&quot;
    bl_label = &quot;Bake Displace modifier&quot;
    
    def execute(self,context):
       
        ob = bpy.context.active_object        
        mat = ob.active_material
        vertex_name = &quot;Group&quot;                     
        vg = ob.vertex_groups.get(vertex_name)
                    
        if vg:
            bpy.ops.object.mode_set(mode='EDIT') 
            bpy.ops.object.vertex_group_set_active(group=vertex_name)
            bpy.ops.object.vertex_group_select()            
            me = ob.data         
            bm = bmesh.from_edit_mesh(me)            
            border = [ e for e in bm.edges if e.select ]            
            bmesh.ops.subdivide_edges(bm,
                    edges=border,
                    cuts=1,
                    use_grid_fill=True)
            # me.update()
            bpy.ops.object.vertex_group_select()
            bmesh.update_edit_mesh(me)
        return{'FINISHED'}

bpy.utils.register_class(SUBDIVIDE_OT_Vertexgroup)

bpy.ops.subdivide.vertexgroup()