The CYGNO experiment aims to study rare events related to the search for low-mass dark matter and solar neutrino events. One of the main components of background comes from cosmic rays that generate long tracks in the detector’s images. The interaction of such particles with the gas releases a variable energy profile along its trajectory to form tracks with multiple cores that can be easily reconstructed erroneously by being split into more than one cluster. Thus, this work offers a newly adapted version of the well-known density-based spatial clustering of applications with noise (DBSCAN) algorithm, called iDDBSCAN, which exploits the directional characteristics of the clusters found by the DBSCAN to improve its clustering efficiency when dealing with multi-core tracks. This paper provides a detailed explanation of this algorithm, covering its parameter validation and evaluating its influence when integrated into the experiment’s event selection routine. To generate background events, data acquisition was performed with the detector installed in an overground laboratory, leaving it exposed to natural radiation. To produce signals in the energy range of interest for the experiment, a 55Fe radioactive source was used. The achieved results showed that the iDDBSCAN algorithm is capable of improving the background rejection of the experiment, through a more accurate reconstruction of the tracks produced by natural radiation such as cosmic rays, without deteriorating its signal detection efficiency and energy estimation.