How to increase the memory for pandoc via an RMD file?

I'm having a problem with memory allocation when using pandoc ! here's the error I get

 output file: rapport_.knit.md

/usr/bin/pandoc +RTS -K512m -RTS rapport_.knit.md --to docx --from markdown+autolink_bare_uris+tex_math_single_backslash --output /app/rapport_.docx --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --table-of-contents --toc-depth 3 --highlight-style tango --reference-doc tmplt.docx
Killed
<simpleError: pandoc document conversion failed with error 137>

after researching, I found a few posts where the solution proposed was using pandoc_args like here Any Idea How to Fix This in the pandoc_args, Can't Seem to Get It Fixed · Issue #315 · rstudio/rmarkdown · GitHub and here [R] Problem R markdown document

so I did :

---
date: "`r format(Sys.Date(), 'Version du %d %B %Y', locale = 'fr_FR')`"
title: "Rapport"
output:
  officedown::rdocx_document:
    toc: TRUE
    pandoc_args: [
      "+RTS", "-K64m",
      "-RTS"
    ]

---

when calling my Rmd file using rmarkdwon::render

rmarkdown::render("rapport_.Rmd")

nothing actually changes, i still get +RTS -K512m -RTS although it's supposed to be "-K64m" now!

any idea how to do that?