How to force a redraw of a panel in the 3D_View
I suggest start here: How to create a custom UI?

Blender will take care of (re-)drawing the layout properly without doing anything if you add a dedicated StringProperty for your filepath to the Scene, Object or whatever makes sense in your case eg. bpy.types.Scene.my_path = StringProperty(name=&quot;My Path&quot;) and assign self.filepath attribute from the ImportHelper class to your path property:

Code example based on the famous Operator File Import template that comes with Blender:
import bpy
import os

# ImportHelper is a helper class, defines filename and
# invoke() function which calls the file selector.
from bpy_extras.io_utils import ImportHelper
from bpy.props import StringProperty, BoolProperty, EnumProperty
from bpy.types import Operator, Panel


class ImportSomeData(Operator, ImportHelper):
    &quot;&quot;&quot;This appears in the tooltip of the operator and in the generated docs&quot;&quot;&quot;
    bl_idname = &quot;import_test.some_data&quot;  # important since its how bpy.ops.import_test.some_data is constructed
    bl_label = &quot;Import XML Data&quot;

    # ImportHelper mixin class uses this
    filename_ext = &quot;.xml&quot;

    filter_glob: StringProperty(
        default=&quot;*.xml&quot;,
        options={'HIDDEN'},
        maxlen=255,  # Max internal buffer length, longer would be clamped.
    )

    # List of operator properties, the attributes will be assigned
    # to the class instance from the operator settings before calling.
    use_setting: BoolProperty(
        name=&quot;Example Boolean&quot;,
        description=&quot;Example Tooltip&quot;,
        default=True,
    )

    def execute(self, context):
        folder, file = os.path.split(self.filepath)
        context.scene.my_path = self.filepath
        print (folder, file)
        return {'FINISHED'}


class OBJECT_PT_CustomPanel(Panel):
    bl_label = &quot;My Panel&quot;
    bl_idname = &quot;OBJECT_PT_custom_panel&quot;
    bl_space_type = &quot;VIEW_3D&quot;   
    bl_region_type = &quot;UI&quot;
    bl_category = &quot;Tools&quot;
    bl_context = &quot;objectmode&quot;
    '''
    @classmethod
    def poll(self,context):
        return context.object is not None
    '''
    def draw(self, context):
        layout = self.layout
        scene = context.scene
        layout.prop(scene, &quot;my_path&quot;, text=&quot;File&quot;)
        layout.operator(ImportSomeData.bl_idname)
        layout.separator()
        
def register():
    bpy.utils.register_class(ImportSomeData)
    bpy.utils.register_class(OBJECT_PT_CustomPanel)
    bpy.types.Scene.my_path = StringProperty(name=&quot;My Path&quot;)


def unregister():
    bpy.utils.unregister_class(OBJECT_PT_CustomPanel)
    bpy.utils.unregister_class(ImportSomeData)
    del bpy.types.Scene.my_path


if __name__ == &quot;__main__&quot;:
    register()

    # test call
    #bpy.ops.import_test.some_data('INVOKE_DEFAULT')