After fiddling this for a while, I’m pretty sure that Obsidian is not violating the Commonmark spec. (At least not in any obvious way.)
The issue here is that nested lists are allowed a maximum indent of 3 spaces beyond the width of the parent list item marker (- and a space in this instance). Beyond that, it’s supposed to be considered a code block, at least if there is a blank line above it. However, if there’s no blank line, it fails the Commonmark indented list rule, and falls back to being treated as part of the current paragraph (i.e., the list line above it).
(You can see this more clearly in preview mode, where the contents of the item are wrapped up onto the previous task list line.)
So, I think the short answer to this is, follow Commonmark indentation rules, and you’ll be fine.