### 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)
ClassDB::bind_method(D_METHOD("remove_debugger_plugin", "script"), &EditorPlugin::remove_debugger_plugin);
	GDVIRTUAL_BIND(_forward_canvas_gui_input, "event");
	GDVIRTUAL_BIND(_forward_canvas_draw_over_viewport, "viewport_control");
	GDVIRTUAL_BIND(_forward_canvas_force_draw_over_viewport, "viewport_control");
	GDVIRTUAL_BIND(_forward_3d_gui_input, "viewport_camera", "event");
	GDVIRTUAL_BIND(_forward_3d_draw_over_viewport, "viewport_control");
	GDVIRTUAL_BIND(_forward_3d_force_draw_over_viewport, "viewport_control");
	GDVIRTUAL_BIND(_get_plugin_name);
	GDVIRTUAL_BIND(_get_plugin_icon);
	GDVIRTUAL_BIND(_has_main_screen);
	GDVIRTUAL_BIND(_make_visible, "visible");
	GDVIRTUAL_BIND(_edit, "object");
	GDVIRTUAL_BIND(_handles, "object");
	GDVIRTUAL_BIND(_get_state);
	GDVIRTUAL_BIND(_set_state, "state");
	GDVIRTUAL_BIND(_clear);
	GDVIRTUAL_BIND(_save_external_data);
	GDVIRTUAL_BIND(_apply_changes);
	GDVIRTUAL_BIND(_get_breakpoints);
	GDVIRTUAL_BIND(_set_window_layout, "configuration");
	GDVIRTUAL_BIND(_get_window_layout, "configuration");
	GDVIRTUAL_BIND(_build);
	GDVIRTUAL_BIND(_enable_plugin);
	GDVIRTUAL_BIND(_disable_plugin);
	ADD_SIGNAL(MethodInfo("scene_changed", PropertyInfo(Variant::OBJECT, "scene_root", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
	ADD_SIGNAL(MethodInfo("scene_closed", PropertyInfo(Variant::STRING, "filepath")));
	ADD_SIGNAL(MethodInfo("main_screen_changed", PropertyInfo(Variant::STRING, "screen_name")));
	ADD_SIGNAL(MethodInfo("resource_saved", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource")));
	ADD_SIGNAL(MethodInfo("project_settings_changed"));
	BIND_ENUM_CONSTANT(CONTAINER_TOOLBAR);