### Godot version

4.0.3.stable

### System information

Linux/X11

### Issue description

when creating addons, i want to use relative paths so that things don't break if i (or another user) decides to rename and/or move the add-on's folder.

using relative paths with ``add_autoload_singleton()`` doesn't work because of an error when enabling the add-on.

## ``res://addons/my_plugin/plugin.gd``

```GDScript
@tool
extends EditorPlugin


func _enter_tree():
	# this line doesn't work:
	add_autoload_singleton('MyAutoload', 'my_autoload.gd')
	# these lines work:
	#add_autoload_singleton( 'MyAutoload',
	#	'res://addons/my_plugin/my_autoload.gd'
	#)


func _exit_tree():
	remove_autoload_singleton('MyAutoload')
```

## error message window when enabling the add-on

```
┌─────────────────────────────────────────────────┐
│ Warning!                                  _ □ X │
├─────────────────────────────────────────────────┤
│ Can't add Autoload:                             │
│ res:// is an invalid path. File does not exist. │
│                                                 │
│              [OK]      [Copy Text]              │
└─────────────────────────────────────────────────┘
```

the add-on does not get disabled because of the error.
the error-free parts of the add-on still get activated, just the autoload doesn't get created. 

### Steps to reproduce

1. create a plugin with the subfolder "my_plugin" and script name "plugin.gd"
2. create an empty script in ``res://addons/my_plugin/my_autoload.gd``
3. edit ``res://addons/my_plugin/plugin.gd``:
```GDScript
@tool
extends EditorPlugin


func _enter_tree():
	add_autoload_singleton('MyAutoload', 'my_autoload.gd')


func _exit_tree():
	remove_autoload_singleton('MyAutoload')

```
4. enable the plugin
5. see the error message window

### Minimal reproduction project

[add_autoload_singleton.zip](https://github.com/godotengine/godot/files/11706746/add_autoload_singleton.zip)
(13.9 KiByte download, 11.4 KiByte unzipped)
EditorNode::get_editor_data().add_custom_type(p_type, p_base, p_script, p_icon);
}
void EditorPlugin::remove_custom_type(const String &p_type) {
	EditorNode::get_editor_data().remove_custom_type(p_type);
}
void EditorPlugin::add_autoload_singleton(const String &p_name, const String &p_path) {
	EditorNode::get_singleton()->get_project_settings()->get_autoload_settings()->autoload_add(p_name, p_path);
}
void EditorPlugin::remove_autoload_singleton(const String &p_name) {
	EditorNode::get_singleton()->get_project_settings()->get_autoload_settings()->autoload_remove(p_name);
}
Button *EditorPlugin::add_control_to_bottom_panel(Control *p_control, const String &p_title) {