This is a little complicated, but there are two lines because when you open the automation lane for the CC64 controller, that is the AUTOMATION lane for that controller. HOWEVER, there is also MIDI recorded for that controller inside the midi clip. They are two different things. So what you are seeing as the uneditable automation is actually the MIDI controller data in the midi clip, which can only be edited in the MIDI clip itself. The line that you CAN edit is the automation data you are creating for that controller. Again, they are just distinctly different ways of controlling the same thing.
The ANSWER to your problem then is a choice: You can either go into the midi clip itself and edit the CC64 controller data there. OR you can select the midi clip with the sustain controller data you want to edit, and then go under the “MIDI” menu, then to “Functions” then select “Extract MIDI Automation”.
That will take the MIDI controller data OUT of the MIDI clip and place it on an automation lane instead, making it editable in the automation lane as you would expect.