If you try to put more than one thing, like two code blocks or additional text etc. into a codewindow, codewindow will silently drop the additional elements. An easy way around this (that clutters my source code a bit) is to wrap the second element in a fenced div,
Drops the second code block
::: {.codewindow .r}
my-script.R
```r
runif(1)
```
```r
runif(42)
```
:::
Keeps the second code block
::: {.codewindow .r}
my-script.R
::: {.contents}
```r
runif(1)
```
```r
runif(42)
```
:::
:::