When you delete space between clips, all clips in all unlocked tracks shift according to the duration of the gap. To prevent a track from shifting during a ripple delete (or any insert or extract edit), lock the track.
Right-click
(Windows) or Ctrl-click (Mac OS) the empty space, and choose Ripple
Delete.
You can also Right-click (Windows) or Ctrl-click
(Mac OS) an empty space and choose Ripple Delete.