It is possible. I personally followed this video to make the joystick and then edited the function to translate the offset of the front sprite in relation to back sprite to a simple Vector2 (so for example, (0,1) is right and (-1,1) is up and right). From there it's just a matter of a function to react to these values in realtime and press and release the buttons (with Input.actionpress() and Input.actionrelease())
I know it sounds quite confusing so here is my joystick.gd script and a picture of nodes placement.

(Front sprite is the circular one that moves, and the Back sprite is the static one)
I have this saved as a custom scene so I can drop it in wherever I need a virtual joystick. And here's a gif to see the result.
If it's still unclear or if you want me to clarify something just ask.