These are the necessary settings for MIDI Record Mode:
In the Preferences your setting is already correct:
In the Key Editor have the “Record in Editor” mode activated.
Advanced tipp: If you know the area that you want to work on you can use Punch In and Out to make sure you only overwrite that particular area.
And please stop calling MIDI CC lanes “automation lanes”, because they are quite something different. Thank you.