### 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("add_autoload_singleton", "name", "path"), &EditorPlugin::add_autoload_singleton);
	ClassDB::bind_method(D_METHOD("remove_autoload_singleton", "name"), &EditorPlugin::remove_autoload_singleton);
	ClassDB::bind_method(D_METHOD("update_overlays"), &EditorPlugin::update_overlays);
	ClassDB::bind_method(D_METHOD("make_bottom_panel_item_visible", "item"), &EditorPlugin::make_bottom_panel_item_visible);
	ClassDB::bind_method(D_METHOD("hide_bottom_panel"), &EditorPlugin::hide_bottom_panel);
	ClassDB::bind_method(D_METHOD("get_undo_redo"), &EditorPlugin::get_undo_redo);
	ClassDB::bind_method(D_METHOD("add_undo_redo_inspector_hook_callback", "callable"), &EditorPlugin::add_undo_redo_inspector_hook_callback);
	ClassDB::bind_method(D_METHOD("remove_undo_redo_inspector_hook_callback", "callable"), &EditorPlugin::remove_undo_redo_inspector_hook_callback);
	ClassDB::bind_method(D_METHOD("queue_save_layout"), &EditorPlugin::queue_save_layout);
	ClassDB::bind_method(D_METHOD("add_translation_parser_plugin", "parser"), &EditorPlugin::add_translation_parser_plugin);
	ClassDB::bind_method(D_METHOD("remove_translation_parser_plugin", "parser"), &EditorPlugin::remove_translation_parser_plugin);
	ClassDB::bind_method(D_METHOD("add_import_plugin", "importer", "first_priority"), &EditorPlugin::add_import_plugin, DEFVAL(false));
	ClassDB::bind_method(D_METHOD("remove_import_plugin", "importer"), &EditorPlugin::remove_import_plugin);
	ClassDB::bind_method(D_METHOD("add_scene_format_importer_plugin", "scene_format_importer", "first_priority"), &EditorPlugin::add_scene_format_importer_plugin, DEFVAL(false));
	ClassDB::bind_method(D_METHOD("remove_scene_format_importer_plugin", "scene_format_importer"), &EditorPlugin::remove_scene_format_importer_plugin);
	ClassDB::bind_method(D_METHOD("add_scene_post_import_plugin", "scene_import_plugin", "first_priority"), &EditorPlugin::add_scene_post_import_plugin, DEFVAL(false));
	ClassDB::bind_method(D_METHOD("remove_scene_post_import_plugin", "scene_import_plugin"), &EditorPlugin::remove_scene_post_import_plugin);
	ClassDB::bind_method(D_METHOD("add_export_plugin", "plugin"), &EditorPlugin::add_export_plugin);
	ClassDB::bind_method(D_METHOD("remove_export_plugin", "plugin"), &EditorPlugin::remove_export_plugin);
	ClassDB::bind_method(D_METHOD("add_node_3d_gizmo_plugin", "plugin"), &EditorPlugin::add_node_3d_gizmo_plugin);
	ClassDB::bind_method(D_METHOD("remove_node_3d_gizmo_plugin", "plugin"), &EditorPlugin::remove_node_3d_gizmo_plugin);
	ClassDB::bind_method(D_METHOD("add_inspector_plugin", "plugin"), &EditorPlugin::add_inspector_plugin);
	ClassDB::bind_method(D_METHOD("remove_inspector_plugin", "plugin"), &EditorPlugin::remove_inspector_plugin);
	ClassDB::bind_method(D_METHOD("add_resource_conversion_plugin", "plugin"), &EditorPlugin::add_resource_conversion_plugin);
	ClassDB::bind_method(D_METHOD("remove_resource_conversion_plugin", "plugin"), &EditorPlugin::remove_resource_conversion_plugin);
	ClassDB::bind_method(D_METHOD("set_input_event_forwarding_always_enabled"), &EditorPlugin::set_input_event_forwarding_always_enabled);
	ClassDB::bind_method(D_METHOD("set_force_draw_over_forwarding_enabled"), &EditorPlugin::set_force_draw_over_forwarding_enabled);
	ClassDB::bind_method(D_METHOD("get_editor_interface"), &EditorPlugin::get_editor_interface);
	ClassDB::bind_method(D_METHOD("get_script_create_dialog"), &EditorPlugin::get_script_create_dialog);
	ClassDB::bind_method(D_METHOD("add_debugger_plugin", "script"), &EditorPlugin::add_debugger_plugin);