onBeforeTaskMove event getting fired while scheduling

  onBeforeTaskMoveEvent((id, parent, tindex) => {
    let droppableNode = getGanttTaskById(parent);
    if (droppableNode?.type === 'task') {
      removeLinks(droppableNode);
    }
    // eslint-disable-next-line no-console
    console.log(
      id,
      getGanttTaskById(id).text,
      getGanttTaskById(id).duration,
      parent,
      'here'
    );
    if (isVirtualRootNode(parent)) {
      message.error("Can't perform this operation ");
      return false;
    }
    return true;
  });
function isVirtualRootNode(parent: string | null | number): boolean {
  if (parent === null || parent == 0) return true;
  return false;
}

export default isVirtualRootNode;

This event is getting called while setting baseline and scheduling the gantt. Both of them have nothing to do with task move.

Hello Rijul,
I couldn’t reproduce the issue in the following snippet:
https://snippet.dhtmlx.com/nopyee4v

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 to the following snippet and make sure that the issue is reproduced there:

Then, click on the Save button and send me the link.
Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.