Enabling bShareMaterialShaderCode breaks memory tracking and wastes memory due to issues in ShaderCodeLibrary. It is also worth noting that after cooking with bShareMaterialShaderCode enabled causes the tracking for the pixel and vertex shaders to disappear from the memreport.
Tested in 4.21.2 (CL - 4753647), 4.22.3 (CL - 7053647), 4.23 (CL - 7247482), 4.24 (CL - 7235487)
Expected: The memreports would be identical in terms of shader code memory usage
Result: The memreport that was taken after enabling Share Material Shader code consumes more memory
There's no existing public thread on this issue, so head over toAnswerHub just mention UE-77543 in the post.