Programed MIDI passages. At the end Cubase adds an extra note or two.
Notes play but don’t show up in the main view or the editor.
Now way to “delete” them.
Well those extra notes are coming from somewhere. You need to figure out where that is and eliminate it. You haven’t provided enough info for anyone to speculate much beyond that.
You might want to use the MIDI Monitor plug-in and also the MIDI List Editor to help see what is happening.