### 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)
#include "editor_plugin.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_file_system.h"
#include "editor/editor_inspector.h"
#include "editor/editor_interface.h"
#include "editor/editor_node.h"
#include "editor/editor_translation_parser.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/export/editor_export.h"
#include "editor/gui/editor_title_bar.h"
#include "editor/import/editor_import_plugin.h"
#include "editor/import/resource_importer_scene.h"
#include "editor/inspector_dock.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "editor/plugins/editor_debugger_plugin.h"
#include "editor/plugins/editor_resource_conversion_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
#include "editor/project_settings_editor.h"
#include "editor/scene_tree_dock.h"
#include "scene/3d/camera_3d.h"
#include "scene/gui/popup_menu.h"
#include "servers/rendering_server.h"
void EditorPlugin::add_custom_type(const String &p_type, const String &p_base, const Ref<Script> &p_script, const Ref<Texture2D> &p_icon) {