Display of a standard non UI material in a widget?

I’m trying to add a little preview of a standard materials in a widget using the ‘Draw Material to Render Target’ node. But they are all black like that:

edit mode

Here is the part in the button widget that applies the image to the slate brush:

Here is how I create the preview icons. I’m rendering the material to a texture and then apply that texture to a dynamic material instance. I do that for all thumbs and then save the result in a material array.

Finally here are the material and the render to texture target:

I’ve done something similar with render to texture targets and a camera that renders them in a room out of sight. This time I want to save the
room with the camera and render the texture directly from the material. Then I put it in a material which is in the UI Domain and can be displayed in the UI. But it doesn’t work. Looks like the texture doesn’t get created at all.
Is that expected? Or is there a better way to display a ‘normal’ material in a widget? Thanks for your help.

Nevermind. I did a bit more research and I don’t see anyone having a solution for this. So I put it on hold for now.