Probably, the issue is related to the Gantt configuration, but it is hard to suggest what might be wrong as I don’t see your code.
Please, add your configuration in the following snippet and make sure that the issue is reproduced there:
Hello,
Thank you for sending the snippet.
Everything works as expected as you only modify the DOM elements. After Gantt repaints the changes, old HTML elements are removed and Gantt generates new ones according to the settings in the addTaskLayer function.
You need to add new style elements or modify the configuration in the addTaskLayer method.