Not certain I'm following your use case.
You control the graphic through the stylesheet? Are you inserting it as gentext, or just modifying it based on it's context? You stated in ditabase, it works fine. Can you compare what property sets and keeps settings are different between the two?