Your issue is this... π²
The rectangular face inside the DC has no materials at all == <default>.
Use Entity Info on the internal face [edit the DC] to see that.
When you change the DC's "Material" it applies to the DC instance itself.
So when you get Entity Info on the DC itself it's say "Red".
But the internal face with no material <default> which are inside a component [or group] 'display' the material of that container - the face's material does NOT change from <default>.
So although a face might 'look' "Red", it actually has no material at all <default>.
Your DC code looks for all faces colored "Red" inside the DC component, BUT there are NONE, because the actual face has the <default> material - so you correctly get Area=0.
You can fix the DC code to report the face's area by using Area as =FACEAREA()/2
Note /2 *** to consider just the one side !
Now that DC always reports the Area of the internal face***.
In your current DC the Area is returned, and you have its Material of say "Red" etc.
BUT if you have a "Red" material actually painted on to the face itself [one side], then the code =FACEAREA(Material) will work IF the chosen Material is "Red" - giving Area=12345... - otherwise it's Area=0 - as if another color is chosen there are no "Blue" or "Green" faces, so then the DC's chosen Material returns Area=0 again...
In DC code you cannot assign a material to a face, only to a 'container' - component-instance or group.
You can change the way a face 'appears', because any faces using the <default> material displays using the container's material, but its material is still <default>.
...