In my example, I have a red diamond with a green buffer and the buffer appears as a green circle in the layer panel.
There is two different symbols on this layer. The one at the bottom is the buffer itself, a simple fill with the color you want (green here).
The filling color is transparent so it's not visible in the layer panel but in the data defined rules, I set this rule :
if( "id" is null, '#0ffc41','#0efc41')
Replace "id" with a random field of your choice.
This allows me to set a green color code is any case possible (there might be a better way to set this). But since the color picked earlier is transparent, the symbol appears as transparent but the rule then apply a green color to the buffer.
Then, to have a green dot symbol :
I set a centroid filling with the symbol of my choice, and to make it green on the layer panel and transparent on the map, I use the same technique as before but in reverse.
The symbol color is set to green but in the data defined rules I set a transparent color for all the cases possible.
if( "id" is null, '#00000000','#00000000')