The following expression is used to label duplicate geometries avoiding text overlap:
array_to_string( array_prepend( overlay_equals('POINT_LABEL',VALUETEXT), "VALUETEXT" ) )
Although the function works perfectly and the labels do not appear overlapped (as shown in the screenshot), I would like to solve the problem of repeated labels being displayed. The repetition is happening because all the geometries are being labelled.
I think that a solution could be to group the repeated values for every duplicate geometry, since eliminating duplicate geometries is not a possibility in my project case. Or maybe there is a different solution approach.