Fixes#4841
When nodes were programmatically selected (e.g., adding a new node with `selected: true`),
the nodes selection rectangle would appear but dragging it would not work.
Changes:
- Consolidated duplicate effect hooks in useDrag into a single useIsomorphicLayoutEffect
- Added `disabled` parameter to useDrag to allow external control
- NodesSelection now passes `disabled: !shouldRender` to useDrag
- Improved condition clarity with `shouldRender` variable
This ensures drag handlers are properly set up when nodeRef.current becomes available,
even when the selection state changes after the initial render.