I agree, it is slightly tricky and there will be edge cases with handling the links.
In the above scenario, I would just keep it simple, and have the exported Note A contain the text …. [[Note B]] …. When I export “Note B” to markdown as well, I can drop both these files (Note A and Note B) into Obsidian/iA Writer and the links will work.
Obsidian, or Roam or Craft do not care about the file/folder path as much - if I click [[Note B]], it will search for a this note in the entire vault, and open Note B even if that note is in a different directory.
This is also very similar to how Craft markdown exports work - they remove all of their internal Craft links, convert it to wikilinks before creating a markdown export when exporting all notes. There are still several cases, where these links are not always working corrently in Obsidian or Roam, and need some manual fixing, but most of the links work fine.
Maybe just a simple option to pick Agenda internal links, or wikilinks would be awesome