Can you draw UMaterialInstanceDynamic onto UCanvasRenderTarget2D?

I have a UMaterialInstanceDynamic and a UCanvasRenderTarget2D.

The UMaterialInstanceDynamic works fine with AHUD::DrawMaterial and SetBrushToMaterial on a UMG UImage.

Likewise UCanvasRenderTarget2D works fine when I draw it with AHUD::DrawTexture or SetBrushResourceObject on a UMG UImage.

However when I try to draw the UMaterialInstanceDynamic to the UCanvasRenderTarget2D it writes transparent pixels (I assume like FColor(0,0,0,0)) to its rect:

void UMyObject::OnMyRenderTargetUpdate(UCanvas* Canvas, int32 Width, int32 Height)
{
	Canvas->K2_DrawMaterial(MyMaterialInstanceDynamic,
            FVector2D(0,0),
            FVector2D(100,100),
            FVector2D(0,0),
            FVector2D(1,1));
        // draws a transparent rect ???
}

Any idea why that would be? Can you not use dynamic material instances to draw to render targets?

It looks like the dynamic material is a red herring, it doesn’t work with a normal material either.

If I change the Material Domain from User Interface to Surface, and then check the “Enable with Editor Compositing” checkbox in the material, then it works.

I don’t understand why or whats going on.