Haven't worked with Python at all so not sure how pyautogui does it. But as far as I know, Godot has two ways to simulate input:
parse_input_event() you gotta create your own input event which is really easy actually.
For example, to create an event for the left mouse button at the position (10, 10):
var event_lmb = InputEventMouseButton.new()
event_lmb.position = Vector2(10, 10)
InputEventMouseButton class has a property called
pressed which controls whether the button is... well, pressed/held down or not.
If you're looking for a "full click", AKA simulating someone pressing down the LMB and then releasing it, you can do something like this:
event_lmb.pressed = true
event_lmb.pressed = false
The above code, combined with the first code will simulate a full left mouse click at position (10, 10).