My apologies. I was hoping to lead you down a path to get hands-on experience with potential complexities and trouble shooting technique.
Vojo is correct that manual setting can clobber the color. But, it can still be solved with formula, the following works: =SETF(GetRef(FillForegnd),"GUARD(INDEX(LOOKUP(Prop.Domain,Prop.Domain.Format),User.DomainColourChoices))"). No extra cell needed. At any rate, two solutions.
Also, unless it's a desired feature, you do need to add a Guard() wrapper around the background color. Otherwise, user can also change that.
Why it worked sometimes and not others...no idea.
Basically, SETF will force write to a cell, including over-writing a guarded formula. But, it only writes when activated. That's why user intervention would change the color until shapedata was re-used. With the formula change, the Guard protects the contents from direct user GUI changes. Yes, it's a formula, and yes it's working in this case. No, I can't explain it. So, Vojo's approach might be more reliable, predictable.
Finally, in the shapesheet Events section, you might want to add DOCMD(1312). Double clicking the shape will bring up the shapedata menu.
Wapperdude