Select all items within the rectangular box

I have been using the dragSelectingTool to drag and create a rectangle to select the items within them. =
(go.Part, { layerName: 'Tool', selectable: true }, (go.Shape, ‘Rectangle’,
{ name: ‘SHAPE’, fill: null, stroke: ‘dodgerblue’, strokeWidth: 2 })

However, when we select multiple items on the screen and release the mouse key, it only selects the last item on the screen. What can I do to resolve the issue?