Mesh reverts back to the state before the script was run
Man that's a doozy

I have no idea, thought it could be a select flush hassle, as another way to get it to "work as expected" is to toggle into another select mode and back.

Couldn't get any wranglation of code to do it though, even toggling edit mode with code as commented... strange one

I have put together this as not an answer but as a means to express an alternative poke n select code. edges is the boundary of the selection, either is a selected boundary edge (one link face) or only has one of two linked faces selected.  

The bmesh poke operator returns the faces created. Any faces that don't include an edge in edges are selected.


Result of using method below

def main(context):
    ob = context.edit_object
    me = ob.data
    bm = bmesh.from_edit_mesh(me)
    faces = [f for f in bm.faces if f.select]
    edges = set(e for e in bm.edges if e.select 
            and (e.is_boundary or not all(f.select for f in e.link_faces)))
    ret = bmesh.ops.poke(bm, faces=faces)
    for f in ret['faces']:
        f.select = not bool(set(f.edges).intersection(edges))
    bmesh.update_edit_mesh(me)