### Godot version

4.0.dev (ba9491f87)

### System information

Windows 11 Chrome 109.0.5414.75 (Official Build), iOS 16.2 Safari

### Issue description

When exporting a simple project for Web with any GDScript like following:
```gdscript
extends Control

```
will print the following error to the console:
```
USER ERROR: U_ILLEGAL_ARGUMENT_ERROR
   at: _is_confusable (modules\text_server_adv\text_server_adv.cpp:6151)
```

![image](https://user-images.githubusercontent.com/173001/214089154-d88f3f44-b670-41ec-9743-30627677968e.png)

For more complex project, following additional errors are showing:
```
USER ERROR: U_FILE_ACCESS_ERROR
   at: _spoof_check (modules\text_server_adv\text_server_adv.cpp:6174)
USER ERROR: U_ILLEGAL_ARGUMENT_ERROR
   at: _is_confusable (modules\text_server_adv\text_server_adv.cpp:6151)
```
When I've inserted `print_line(p_string)` at text_server_adv.cpp line 6172, following logs are collected:
![image](https://user-images.githubusercontent.com/173001/214091164-cb5af630-56d2-446e-b1c4-dc20066565d5.png)

It seems that the identifiers of *.gd files are printed to the console.


### Steps to reproduce

1. Open minimal reproduction project.
2. Exports to Web.
3. Open exported site with Chrome and open developer console.
4. Following error logs will be seen (reproduced): `USER ERROR: U_ILLEGAL_ARGUMENT_ERROR`

### Minimal reproduction project

[text_server_adv_error.zip](https://github.com/godotengine/godot/files/10481582/text_server_adv_error.zip)

hb_language_t lang = hb_language_from_string(p_sd->spans[p_span].language.ascii().get_data(), -1);
		hb_buffer_set_language(p_sd->hb_buffer, lang);
	}
	hb_buffer_add_utf32(p_sd->hb_buffer, (const uint32_t *)p_sd->text.ptr(), p_sd->text.length(), p_start, p_end - p_start);
	Vector<hb_feature_t> ftrs;
	_add_featuers(_font_get_opentype_feature_overrides(f), ftrs);
	_add_featuers(p_sd->spans[p_span].features, ftrs);
	hb_shape(hb_font, p_sd->hb_buffer, ftrs.is_empty() ? nullptr : &ftrs[0], ftrs.size());
	unsigned int glyph_count = 0;
	hb_glyph_info_t *glyph_info = hb_buffer_get_glyph_infos(p_sd->hb_buffer, &glyph_count);
	hb_glyph_position_t *glyph_pos = hb_buffer_get_glyph_positions(p_sd->hb_buffer, &glyph_count);
	int mod = 0;
	if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
		TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
		if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
			mod = (layout << 24);
		}
	}
	
	if (glyph_count > 0) {
		Glyph *w = (Glyph *)memalloc(glyph_count * sizeof(Glyph));
		int end = (p_direction == HB_DIRECTION_RTL || p_direction == HB_DIRECTION_BTT) ? p_end : 0;
		uint32_t last_cluster_id = UINT32_MAX;
		unsigned int last_cluster_index = 0;
		bool last_cluster_valid = true;
		for (unsigned int i = 0; i < glyph_count; i++) {
			if ((i > 0) && (last_cluster_id != glyph_info[i].cluster)) {
				if (p_direction == HB_DIRECTION_RTL || p_direction == HB_DIRECTION_BTT) {
					end = w[last_cluster_index].start;
				} else {