Since 7.5, the option "Comments in margin" is available in the PDF export dialog for Writer, but it is not documented in the help page[1], and instead includes a workaround using the Print dialog. [1]: https://help.libreoffice.org/7.5/en-US/text/shared/01/ref_pdf_export_general.html
Stéphane Guillou committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/ceb7ce7ac4ce11fb9d57c346359a9e3203d950c5 tdf#156605 Document new "Comments in margin" options for PDF
fixed in master, cherrypick to 7.6 in gerrit.