Whenever you make a patch, create a .pd file called "scraps", "trashcan", etc., ".pd" and include that patch as an abstraction in your main patch.

Then when you want to save a piece/section of code, comments (to yourself) you make, etc., just cut and paste them into that abstraction (for you to retrieve later if you want or need them).

Then once you've finished your patch/work just delete that abstraction.

I hope this makes your life easier and you less concerned about losing your work, :-)...even with the Undo feature.

Peace through sharing.
Stay safe.

-S