Hey @argentum I finally figure it out thanks to your comment. The problem is that I was trying to export standalone notes. When I export notes inside items, then it works perfectly.
By exporting some I noticed that the “relate” field is not kept in the md note (as a link to those notes), which I guess makes sense because that note could not exist if and I do not create it as well. Since that field is gold, I will not use Zotero as a Zettelkasten tool, yet your script is still pretty cool and I will use it for other ends in my workflow. Thank you again!