"Watch Me Do" workflow succeeds in Automator but not as app
I've previously discovered when attempting to Applescript an application through UI scripting, that the Applescript command of the mouse didn't quite behave the same as the real mouse. For instance, I would be able to command the change of a dropdown box, but the app wouldn't register the change until a "real" selection by mouse occurred.

It must have been a bug in the design of the app, but it was defunct and I had to find a solution. I ended up using "Extra Suites" by Kanzu, which was able to simulate the equivalent of a "real" mouse click.

Automator uses the same Apple Events as Applescript, and perhaps is falling to the same problem. What VPN client are you using? You might be able to solve the problem by using some Applescript (if the client supports it), or switching to another VPN client.