Require Blender to update N or T panel
Use Region.tag_redraw on the corresponding region. The region type of the T-Panel is 'TOOLS' and the type of the N-Panel is 'UI'.

I.e.

for region in context.area.regions:
    if region.type == "UI":
        region.tag_redraw()