To replicate, make a song with multiple patterns, pattern 1 and pattern 2. Start playing, and just before the editor moves to pattern 2, hold down the mouse to add a note somewhere in pattern 1. When the song changes to pattern 2, it copies pattern 1 into pattern 2 and whatever you had in pattern 2 is lost. Undo does not restore it, unfortunately.