I think you would be better of editing your .zshrc files with a regular Text Editor. In like 20 years of being a Mac user I’ve used Fink, MacPorts, homebrew and who knows what else and I’ve only needed to tweak those .rc files in my home folder because those apps are mostly run from the Terminal, never the system or session PATH.
The issue I am having is with Node apps/scripts that I write.
I can run them fine from Terminal. But sometimes I want to use the output of such a Node app as a Textexpander or Typinator macro or as a Keyboard Maestro macro and when I do that it seems there are forever issues where either my app or some library or other dependency is in a different folder so the node app does not execute from those environments.
PATH is commonly set in two places: by launchctl (unique to macOS), and in the files that are read by the shell when Terminal starts up. These files vary by the shell you’re using, but for bash, for example, they are .profile, .bash_login, and .bashrc; and for zsh they are .zprofile and .zshrc.
Probably what is happening in your case is that PATH is being set or modified by one of those files, which makes your scripts run in Terminal, while in TextExpander etc. those files are not being read because a shell is not being started.
Then I think you have to restart. Depending on how you set you PATH in your .rc files, you may then end up with duplicate entries in PATH when you launch a shell. That won’t hurt anything but it may make debugging more difficult later.