Function call when dragged and dropped a frame node on a figma page

Working on figma plugin development, so I need to call a function ReorganizeFunc() when
a frame node is moved from one position to another, only when dropped
I want to call the function. But the below code does not work so, can
you suggest whats the fix required

figma.on('selectionchange', () => {
  const selectedNodes = figma.currentPage.selection;
  selectedNodes.forEach(node => {
    if (node.type === 'FRAME') {
      console.log(`Selected frame is at position: (${node.x}, ${node.y})`);
      ReorganizeFunc(); 
    }
  });
});