(1) You call
sudo --login --user=maria -- "$COMMAND" the "minimal implementation" of run.sh. It is too minimal; I mean it is not complete. What is the shebang? How is $COMMAND derived from $1 or $@? (2) unix.stackexchange.com/a/484363/108618