In Godor 4 Input.set_mouse_mode was changed to Input.mouse_mode.
func _ready(): Input.mouse_mode(Input.MOUSE_MODE_CAPTURED)