It looks like you have not cleared out the old Conditonal Formatting rules first.
Notice how your Conditional Formula code is using yellow highlighting (color 65535), but your screen image shows amber highlighting.
So that color from your image is NOT coming from this new conditional formatting rule. You have old stuff or manual coloring still in there!
This code will first remove all old Conditional Formatting rules. If you still see amber coloring on cells, then that is probably manual coloring you have added to the worksheet.
VBA Code:
Sub Macro2()
' Remove all Conditional Formatting from sheet
Cells.FormatConditions.Delete
' Apply conditional formatting formula
With Range("G1:G5000")
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND($G1<>"""",COUNTIF($G$1:$G$5000,$G1)>1)"
.FormatConditions(.FormatConditions.Count).SetFirstPriority
With .FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
End With
.FormatConditions(1).StopIfTrue = False
End With
End Sub