SceneColor;CustomDepth is not outputting correctly

This is a ‘SceneColor;CustomDepth’ simply rendered, with ‘RenderCustomDepthPass’ set to True for all objects except the character. Therefore, the character should always be invisible, but only when the character is moving, the character become visible. The same phenomenon also occurs when the character has ‘RenderCustomDepthPass’ set to True and the background is set to False. This does not allow PostProcess exclusion process. Does anyone know how to work around this bug?