The problem is that the direct call makes the script name the command name, see
cat /proc/$PID/comm
That causes `pgrep` to match. If called via `bash` then the command name is "bash".
Use
pgrep --exact zeal
instead.