With the recent Shotcut update 25.08.16, clips no longer snap together or towards the vertical marker when moved, trimmed or lengthened. Not sure if I’ve missed something, but I’ve not had this problem with any other previous version of Shotcut.
Make sure that snapping is enabled. You can do this using the icon (looks like an upside down magnet) or by selecting the menu item Settings->Timeline->Snap. Looks like Ctrl-P (or Cmd-P) is a keyboard shortcut to toggle this.