Reloading R/*.R files if modified

I'm using shiny-server with Rstudio server 2022.2.1.461 and I found that when I modify a R file under the R directory, for example R/modules.R, the contents are not reloaded (just the server.R or ui.R on the top level of the project).

Is there any way to ensure this works automatically? I can modify each time the restart.txt file, but that is a bit slow and from the Rstudio server the files I think are reloaded when run under jobs or interactively.