Undo.postprocessModifications does not get fired when changing a material

According to the documentation, Undo.postprocessModifications will be fired when a new set of property modifications are created.

I have tested this for textures and prefabs and it works great. But when I change a property on a material, Undo.postprocessModifications doesn’t get fired even though I can see a new entry when I look at Edit/Undo menu.

This callback is also broken in some other areas like shader graph editor where I can see that the Undo stack has been modified and a new set of changes has been recorded, but this callback does not fire.