Do you mean in the curve/automation editor? It should only display the notes on the track you’re automating so you can better sync your automation.
As far as I know, they’ve always been there and you can’t disable them.
You can only set the curve opacity to 100% (editor’s view menu > editor profile properties > curve > properties > curve fill opacity.
If you’re talking about the MIDI editor however, then right-click on the piano keyboard in the editor from which you want them removed > piano roll region properties > set ghost note contrast to zero.