You have a few misconceptions here. Any commands in .bashrc are run every time you start a new interactive non-login shell. This means that every time you open a new terminal, they will run again. Every time you run bash, they will run again.
The next issue is that, unless you have configured your sudo to allow passwordless execution, your command won't even ...
The setting you're probably looking for is altscreen. This is an optional feature (not all physical terminals support it).
This can be turned on by adding the line altscreen on in $HOME/.screenrc. Now when screen starts up it will enable the behavior you want.
In the current session you can to Control a :altscreen on to enable it immediately.
I must have overlooked the obvious answer.
Adding to sudoers "source" and target user (the user on which behalf the command should get executed) with specifying the path to the program. In my case using the group instead of the user.
www-data ALL = (mytargetuser) NOPASSWD: /path/to/my/program
Solution described in this answer: https://unix....