My current approach is similar.
I git Rstudio code (myproject folder in my example), Shiny app code is part of that folder.
But I copy on Shiny server only Shiny App file, not all scripts and data.
What I do to let app to talk to the rest of the code is change work directory in Shiny app code to myproject.
Not sure is it very good approach, but woks for me so far.
I admit it will be different if you have a separate Shiny server on a different machine.