Cannot get mesh attributes from material nodes

I am trying to get custom properties of the mesh into my material and Blender doesn’t want to do it if I am using modifiers, a “Generate”-type modifier (subdivide, triangulate, wireframe, etc.) specifically that does this.

You can see I have a lovely teal cube which is an average of a green custom property (object) and a blue custom property (mesh):

When I add a bevel modifier, it turns green, which means the mesh’s property is no longer being passed to the material shader.

Applying the modifiers fixes it, but I would prefer not to. How can I get around this?

That’s weird. Try setting a color attribute through geometry nodes instead ?

I have not used geo nodes before, I don’t know how to do that, sorry.

maybe like this for you.

Hope that helps