Python BMESH: For loop breaking trying to split mesh via UV Islands
EDITED:

@batFINGER wrote a more robust solution to this issue, as can be seen in this answer.

ORIGINAL ANSWER:

Solved this by splitting the process into two parts: the first finds faces in each UV island, and the 2nd performs the actual split.
Also, you used the wrong operator (bpy.ops.uv.select_linked_pick) which was part of the original problem (should have used bpy.ops.uv.select_linked).



import bpy, bmesh
context = bpy.context

ob = context.object
me = ob.data
scene = context.scene

bpy.ops.object.mode_set(mode = 'EDIT') 
bm = bmesh.from_edit_mesh(me)
bm.select_mode = {'FACE'}
faceGroups = []
#bm.faces.ensure_lookup_table()

bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='FACE')
save_sync = scene.tool_settings.use_uv_select_sync
scene.tool_settings.use_uv_select_sync = True
faces = set(bm.faces[:])
while faces:
    bpy.ops.mesh.select_all(action='DESELECT')  
    face = faces.pop() 
    face.select = True
    bpy.ops.uv.select_linked()
    selected_faces = {f for f in faces if f.select}
    selected_faces.add(face) # this or bm.faces above?
    faceGroups.append(selected_faces)
    faces -= selected_faces

scene.tool_settings.use_uv_select_sync = save_sync

for g in faceGroups:
    bpy.ops.mesh.select_all(action='DESELECT')
    for f in g:
        f.select = True
    bpy.ops.mesh.split()

ob.data.update()
bpy.ops.object.mode_set(mode='OBJECT')