Back up iCloud Notes to Time Machine or Optimise Mac Storage
Solution 1:
Time Machine does not guarantee to back up iCloud notes.
Optimise Mac Storage makes no difference to this.
Optimise Mac Storage doesn't remove the data from iCloud, so your data is still synchronised to iCloud regardless of whether you choose to always store a copy of iCloud Drive content locally for Time Machine to back up. It's not one or the other, it's ‘only iCloud’ or ‘iCloud and locally’.
However, the premise that Optimise Mac Storage controls the storage of notes locally is false. That setting controls iCloud Drive, which Notes does not participate in. Notes has its own category of iCloud storage and there is no way to guarantee all notes are stored locally.
Notes stores a cache of recently used iCloud notes in
~/Library/Containers/com.apple.Notes/Data/Library/Caches/CloudKit
This destination is excluded from Time Machine by default.
$ tmutil isexcluded ~/Library/Containers/com.apple.Notes/D*/L*/Cac*/C*
[Excluded] …
Therefore Time Machine will not back up this folder even if it did contain all your notes.