I finally solved it after two years. I tried working on a brand new laptop, and the PAD script ran successfully and was able to attach to the Edge browser instance. However, when I ran the PAD script a second time, it failed in the same way (timed out and said it couldn't attach to the browser instance). So, I exited Edge AND I killed all msedge.exe processes in Task Manager, then restarted Edge. The script worked.
So, it seems (at least for me) that the workaround is to kill all msedge.exe processes in between running your PAD scripts. Unfortunately, you have to do this every single time.