### Godot version

4.0beta14

### System information

windows 10, gles 3, nvidia graphics

### Issue description

on beta 14, you cannot drag anymore a node from the scene tree to the script editor to get the node path or the ```@onready``` var snippet

### Steps to reproduce

Using beta 14, try to drag a node from the tree inside the script editor and see the arrow cursor turn into a circular white and red stop sign icon.

Note that this happens even if the script belongs to the currently opened scene.

### Minimal reproduction project

N/A
Vector<Node *> nodes = _find_all_node_for_script(base, base, script);
	HashSet<StringName> methods_found;
	for (int i = 0; i < nodes.size(); i++) {
		List<Connection> signal_connections;
		nodes[i]->get_signals_connected_to_this(&signal_connections);
		for (const Connection &connection : signal_connections) {
			if (!(connection.flags & CONNECT_PERSIST)) {
				continue;
			}
			
			Node *source = Object::cast_to<Node>(connection.signal.get_object());
			if (source && !source->is_inside_tree()) {
				continue;
			}
			const StringName method = connection.callable.get_method();
			if (methods_found.has(method)) {
				continue;
			}
			if (!ClassDB::has_method(script->get_instance_base_type(), method)) {
				int line = -1;
				for (int j = 0; j < functions.size(); j++) {
					String name = functions[j].get_slice(":", 0);
					if (name == method) {
						Dictionary line_meta;
						line_meta["type"] = "connection";
						line_meta["method"] = method;
						line = functions[j].get_slice(":", 1).to_int() - 1;
						text_edit->set_line_gutter_metadata(line, connection_gutter, line_meta);
						text_edit->set_line_gutter_icon(line, connection_gutter, get_parent_control()->get_theme_icon(SNAME("Slot"), SNAME("EditorIcons")));