Changing of preview mode to edit mode is changing the formation of text

Obsidian renders text in Reading View according to the Markdown specs. If you want a list to be rendered as a list, you need to mark it up as a list. (I’d use a code block for paths.)

Or you could modify Obsidian’s settings for “Strict line breaks”: