The solution is to add #| message: !expr NA
in the quarto code block.
Read more here: https://github.com/quarto-dev/quarto-cli/discussions/7443
#| message: !expr NA
species <- iris$Species |> unique()
for(i in species) {
message(i)
Sys.sleep(2)
}