Retool auto-refreshment of the React+Typescript Custom Component

Hello! I have a question about the integration of Bryntum Gantt inside Retool ( Previously, @Alice helped me with this topic. However, Legacy Custom Component is not a good solution for me. I have to many files that must be integrated as React+Typescript Custom Component.

My current problem is refreshing the Bryntum Gantt each time, when the data is updated inside the Retool Custom Component. I recorded the video with the problem using Loom and will show you the error behaviour (Retool + Bryntum Gantt: Refreshing the window after event | Loom).

In the video we have "A button" which is simple HTML element. It changes the "text1" as a simple counter (each click gives +1). Click on Gantt task do the same counting. However, when I do any event inside React/Typescript code, Bryntum Gantt refreshes and forgets about any previous changes. I have already set up some of the listeners in another Custom Component, so they did not return data to Retool, but push the results directly to PostgreSQL DB. It works well. But in this case, I need to work internally in Retool. Example: click on the task gives me task-info inside Retool. This refreshment looks bad and I think, that Retool somehow recreates the whole Bryntum Gantt chart on any event. Other Retool elements are not blinking.

The code example is below, thank you!

P.S. I have already tried to work with useState(), but as I said, it seems that Retool recreates the Gantt chart each time when any thing is updated.