You need a scene with a node that follows the touch position (a sprite maybe).
To simulate joy axes, get its position in the scene together with the width and height of the scene. You can use a Position2D node placed at the bottom right of the scene to find the height and width of the scene by calling $Position.get_position().
To get values ranging from -1 to 1 use:
-1 + (touch_x_position*2)/width and
-1 + (touch_y_position*2)/height (but remember +y is downwards so hopefully you will figure out how to flip the values)
All you need now is to listen for touch input events and get your virtual joystick axes values and use them like you use real joysticks.
I could write the whole script but that will take some time so I hope this is useful enough to give you an idea on how to go about it.