CON-1809 | Fix overlapping of anchored element

consider moving this conditional logic to separate helper function