Yaml bug: editing in live preview or reading mode reformats and deletes comments

The problem

When you edit yaml in live preview or reading mode the yaml lists get reformatted in source mode and all yaml comments are deleted.

Steps to reproduce

Copy this frontmatter in a new note in the sandbox:

datecreated: 2025-08-13
genre: ["action", "thriller", "mystery"]
# media
media: shelf bluray
#local
myrating: 

Switch to live preview or reading mode and either add a number value to the my rating field or delete the mystery genre.

Results:

datecreated: 2025-08-13
genre:
 - action
 - thriller
media: shelf bluray
myrating: 5

The yaml in source mode is reformatted and the comments (which are always only displayed in source mode) are gone.

Interpreting the results

The deletion of comments is definitely a bug, and while the reformatting doesn’t harm, I expect the yaml to respect the way I enter it, which is nice and compact.

I am sorry there are no plans for changing this