I have a shapefile called (AOI) with multiple AOI's and wanted to colour them by ID so that they were all different.
aprx = arcpy.mp.ArcGISProject('current')
m = aprx.activeMap
AOI = m.listLayers('AOI')
sym = AOI.symbology
colorRamp = aprx.listColorRamps("Cyan to Purple")
sym.renderer.colorRamp = colorRamp
AOI.symbology = sym
I have also tried doing this manually as well and the same problem occurs. They also do not re-appear when I change the symbology back to Single Symbol.