OK @Dieg11 thanks for the additional information. One more question... the output of this function should be the same as your project directory:
rprojroot::find_rstudio_root_file()
I just created a test project on my desktop, have made sure it is opened, and have checked both the find_rstudio_root_file() and getwd() output:
> getwd()
[1] "/Users/prenercg/Desktop/test"
> rprojroot::find_rstudio_root_file()
[1] "/Users/prenercg/Desktop/test"
Do you mind running that rprojroot::find_rstudio_root_file() function and sharing the results?