Edit an already marked text css

I’m using codemirror in vue, and i have one component which highlights certain rows in certain colors, using the css property.
In another component I want to change the color of the highlight, so change the css value.
I saw the method getAllMarks which returns an array containing all the TextMarker objects.
I found the one I need, I changed the css value of the object but the color didn’t change, I tried triggering the changed method on that TextMarker but that still didn’t work…
is there a known way to change the css value of an already marked section?

Remove the old mark and add a new one.

Yes that would be the last option because it causes me some trouble,
but editing an existing one isn’t an option?