### 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_disabled(false);
	_playing_edited = p_current;
}
void EditorNode::_run_native(const Ref<EditorExportPreset> &p_preset) {
	bool autosave = EDITOR_GET("run/auto_save/save_before_running");
	if (autosave) {
		_menu_option_confirm(FILE_SAVE_ALL_SCENES, false);
	}
	if (run_native->is_deploy_debug_remote_enabled()) {
		_menu_option_confirm(RUN_STOP, true);
		if (!call_build()) {
			return; 
		}
		EditorDebuggerNode::get_singleton()->start(p_preset->get_platform()->get_debug_protocol());
		emit_signal(SNAME("play_pressed"));
		editor_run.run_native_notify();
	}
}
void EditorNode::_reset_play_buttons() {
	play_button->set_pressed(false);
	play_button->set_icon(gui_base->get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
	play_button->set_tooltip_text(TTR("Play the project."));
	play_scene_button->set_pressed(false);
	play_scene_button->set_icon(gui_base->get_theme_icon(SNAME("PlayScene"), SNAME("EditorIcons")));
	play_scene_button->set_tooltip_text(TTR("Play the edited scene."));
	play_custom_scene_button->set_pressed(false);
	play_custom_scene_button->set_icon(gui_base->get_theme_icon(SNAME("PlayCustom"), SNAME("EditorIcons")));
	play_custom_scene_button->set_tooltip_text(TTR("Play a custom scene."));
}
void EditorNode::_android_build_source_selected(const String &p_file) {