The new HLSL generator does not properly ignore disconnected node output of a Custom HLSL node. Most probably, it’s a clash of token names. As a result, the default return value (unused) is still compiled into the shader code, causing incorrect material behavior
See the repro steps and the attached screenshots, project, for a clean example
A good contact person for this issue in Epic is probably Massimo Tristano (Rendering)