BUG of replacing material instance textures with Python?

Replacing the texture of a material instance with ‘unreal. MaterialEditingLibrary. set_material_instance_texture_parameter_value’, I found that the material’s reference is still linked to the old texture. How can I solve this problem?

You can see in the image below that there are two light colored lines referencing the material, which are the original linked textures, and the white line has been successfully replaced.

When I migrate this texture ball, I also migrate the old textures out