I spent way too much time trying to make this work. Hope this will help someone.
Firstly, you need to install the Obsidian Pandoc and Obsidian Link Convertor plugins.
Afterwards, create a name_here.yaml file somewhere on your system. Open it and add " resource-path: [“/folder/with/your/images”] ".
Now open up the settings of the Pandoc Plugin, set “export files from HTML or markdown?” to markdown, and in the "Extra Pandoc Arguments write " --defaults=/path/to/your/yaml/file.yaml ".
The only thing left to do is changing the Obsidian Image Links with standard markdown links. Open the file you want to export, Right-Click on the newly open tab in the top bar and press on “WikiLinks to Markdown”.
Now you are ready to export as Docx / ODT by pressing Ctrl+P and writing pandoc. Now you should be presented with a few options of export. Choose Docx or ODT and you are good to go.
Hope this helped.
This was inspired by this thread: [BUG] Pandoc cannot find image file unless full relative path is used · Issue #81 · OliverBalfour/obsidian-pandoc · GitHub