ok, I just found out that this is a known issue because the markdownify function was modified to strip the p tags for the inline usage in the frontmatter.
the problem comes if you use a multiline syntax, like the one used in my example in the opening post, that will lead to a series of bugs.
here is the reference issue in github