I am not totally familiar with the algorithm so I might be missunderstanding but comparing with the paper and logically I see a potential issue.
In this line: https://github.com/danielTobon43/DBScan-PCL-Optimized/blob/master/dbscan/src/dbScan.cpp#L214
The pointQueue is cleared. But it is only cleared if it is bigger than a specified value. This seems weird. Should we clear every new iteration. This can result in an incomplete cluster being merged with another very far away. The centroid can be miles away from any of its points in this case. Seems weird but I might be wrong