### Godot version

v4.0.beta15.official [4fa6edc88]

### System information

Windows 11

### Issue description

When drawing a polygon in the editor, several duplicate vertices are added to the polygon array for each click.  In the image below, I clicked three times to draw the triangle, but got 10 entries.  The number you get varies, though I don't know why; I've seen hundreds of points from drawing a hexagon.  I tested it with a Polygon2D, a CollisionPolygon2D, and a CollisionPolygon3D; the issues occurs with all of them.  It later occurred to me that this might happen with a Curve2D as well, and it does.

![image](https://user-images.githubusercontent.com/2808851/214926182-b8609b87-85a1-4a08-8017-be4eeec912c6.png)


### Steps to reproduce

Add a node that has a Polygon or Curve resource, such as a Polygon2D, draw some points, then check the PackedVector2Array resource.

### Minimal reproduction project

N/A
stop_button->set_flat(true);
	launch_pad_hb->add_child(stop_button);
	stop_button->set_focus_mode(Control::FOCUS_NONE);
	stop_button->set_icon(gui_base->get_theme_icon(SNAME("Stop"), SNAME("EditorIcons")));
	stop_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(RUN_STOP));
	stop_button->set_tooltip_text(TTR("Stop the currently running project."));
	stop_button->set_disabled(true);
	ED_SHORTCUT("editor/stop_running_project", TTR("Stop Running Project"), Key::F8);
	ED_SHORTCUT_OVERRIDE("editor/stop_running_project", "macos", KeyModifierMask::META | Key::PERIOD);
	stop_button->set_shortcut(ED_GET_SHORTCUT("editor/stop_running_project"));
	run_native = memnew(EditorRunNative);
	launch_pad_hb->add_child(run_native);
	run_native->connect("native_run", callable_mp(this, &EditorNode::_run_native));
	play_scene_button = memnew(Button);
	play_scene_button->set_flat(true);
	launch_pad_hb->add_child(play_scene_button);
	play_scene_button->set_toggle_mode(true);
	play_scene_button->set_focus_mode(Control::FOCUS_NONE);
	play_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(RUN_PLAY_SCENE));
	play_scene_button->set_tooltip_text(TTR("Run the currently edited scene."));
	ED_SHORTCUT_AND_COMMAND("editor/run_current_scene", TTR("Run Current Scene"), Key::F6);
	ED_SHORTCUT_OVERRIDE("editor/run_current_scene", "macos", KeyModifierMask::META | Key::R);
	play_scene_button->set_shortcut(ED_GET_SHORTCUT("editor/run_current_scene"));
	play_custom_scene_button = memnew(Button);
	play_custom_scene_button->set_flat(true);
	launch_pad_hb->add_child(play_custom_scene_button);
	play_custom_scene_button->set_toggle_mode(true);
	play_custom_scene_button->set_focus_mode(Control::FOCUS_NONE);
	play_custom_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(RUN_PLAY_CUSTOM_SCENE));
	play_custom_scene_button->set_tooltip_text(TTR("Run a specific scene."));