Currently you could use tricky hack with code injection 
Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_129"
Begin Object Class=MaterialExpressionCustom Name="MaterialExpressionCustom_3"
End Object
Begin Object Name="MaterialExpressionCustom_3"
Code="if (IsShadowDepthShader()) {\r\n\treturn 0.0;\r\n} else {\r\n\treturn M;\r\n}}\r\nMaterialFloat CustomExpression2(FMaterialTessellationParameters Parameters,MaterialFloat3 M)\r\n{\r\nif (IsShadowDepthShader()) {\r\n\treturn 0.0;\r\n} else {\r\n\treturn M;\r\n}"
OutputType=CMOT_Float1
Description="IsShadowDepthShaderTess"
Inputs(0)=(InputName="M",Input=(Expression=MaterialExpressionBreakMaterialAttributes'MaterialExpressionBreakMaterialAttributes_9',OutputIndex=10,Mask=1,MaskR=1,MaskG=1,MaskB=1))
MaterialExpressionEditorX=3776
MaterialExpressionEditorY=-576
MaterialExpressionGuid=59958D8148CE4E14E7EC339BBEAFDBAF
Material=PreviewMaterial'/Engine/Transient.M_Desert_Layered'
End Object
MaterialExpression=MaterialExpressionCustom'MaterialExpressionCustom_3'
NodePosX=3776
NodePosY=-576
ErrorType=1
ErrorMsg="Custom material IsShadowDepthShader() missing input 1 (M)"
NodeGuid=21F992714C9D4354E3CE3789312EC886
CustomProperties Pin (PinId=A6F555E540DD2E1A7EED2993C0233787,PinName="M",PinType.PinCategory="required",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.bIsMap=False,PinType.bIsSet=False,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,LinkedTo=(MaterialGraphNode_84 25A57DD744249C2C16B5E4B556B11570,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,)
CustomProperties Pin (PinId=71DB5BE24985833D886585970B2CC603,PinName="Output",PinFriendlyName=" ",Direction="EGPD_Output",PinType.PinCategory="",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.bIsMap=False,PinType.bIsSet=False,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,LinkedTo=(MaterialGraphNode_0 8BA4621040920AD6BC2EF0A2000B9339,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,)
End Object