If a variable is bound in the Design Window of a User Widget asset it will be deleted if you use the menu option "Delete all unused variables".
Found in 4.24.3 CL#11590370
Reproduced in 4.23.1 CL#9631420, 4.25 Preview 3 CL#12192346, 4.26 Main CL#12123513
1. Create a new project.
2. Create a User Widget (DemoWidget).
3. Add an image (DemoImage) in the Design Window.
4. Go to the Graph window and make a Texture2D variable (DemoTex2D).
5. In DemoImage and bind DemoTex2D to the brush image.
6. Go back to the Graph Window.
7. Select Edit->Delete unused variables.
Result: DemoTex2D is deleted.
Expected: DemoTex2D isn't deleted.
There's no existing public thread on this issue, so head over toAnswerHub just mention UE-90867 in the post.