quarto_render function ignores typst-template.typ file

I have a fully formatted Quarto doc with colors, logos etc. using typst-template.typ and typst-show.typ files. It
creates a beautiful PDF document when I click Render in RStudio - however when I run quarto::quarto_render() function, it creates the document but without any of the formatting from the .typ files. All of the files are in the top level of the working directory.

Here is the YAML and sample text from the document:

---
title: "TITLE"
subtitle: "Subtitle"
format: 
  typst:
    template-partials:
      - typst-template.typ
      - typst-show.typ
shortcodes:
  - colbreak.lua
keep-typ: true
execute:
  echo: false
---

# Introduction

Consequat occaecat mollit velit aliquip. Sunt Lorem cupidatat ad adipisicing do excepteur incididunt aliqua minim irure Lorem officia. Consectetur ad sunt amet est consequat voluptate sint consectetur voluptate. Aute adipisicing laborum magna amet aliquip qui in irure qui ut pariatur veniam proident ex. Sit voluptate ut irure quis excepteur nostrud est laboris. Ut ullamco velit ex laboris occaecat voluptate elit dolore ipsum fugiat est id.

And here is the function call in R

quarto::quarto_render(
  input = "test.qmd", 
  output_format = "pdf", 
  output_file = "test_report.pdf"
)

Have to use output_format = "typst", not pdf

quarto::quarto_render(
  input = "test.qmd", 
  output_format = "typst", 
  output_file = "test_report.pdf"
)