### Godot version

4.1.1

### System information

linux

### Issue description

![image](https://github.com/godotengine/godot-proposals/assets/71937306/04dcf0e9-1c0d-4a7f-8ca9-827dd281253a)

![image](https://github.com/godotengine/godot-proposals/assets/71937306/aa70e31e-0486-455a-b8b4-7e589ec7b754)

notice how the first option in the list is never aligned with the button that spawned it.

### Steps to reproduce

right click in the FileSystem dock and hover over the `Create New →` option.

### Minimal reproduction project

editor
Node *n = get_node_or_null(items[p_over].submenu);
	ERR_FAIL_NULL_MSG(n, "Item subnode does not exist: '" + items[p_over].submenu + "'.");
	Popup *submenu_popup = Object::cast_to<Popup>(n);
	ERR_FAIL_NULL_MSG(submenu_popup, "Item subnode is not a Popup: '" + items[p_over].submenu + "'.");
	if (submenu_popup->is_visible()) {
		return; 
	}
	Point2 this_pos = get_position();
	Rect2 this_rect(this_pos, get_size());
	float scroll_offset = control->get_position().y;
	submenu_popup->reset_size(); 
	Size2 submenu_size = submenu_popup->get_size();
	Point2 submenu_pos;
	if (control->is_layout_rtl()) {
		submenu_pos = this_pos + Point2(-submenu_size.width, items[p_over]._ofs_cache + scroll_offset);
	} else {
		submenu_pos = this_pos + Point2(this_rect.size.width, items[p_over]._ofs_cache + scroll_offset);
	}
	
	if (submenu_pos.x < get_parent_rect().position.x) {
		submenu_pos.x = this_pos.x + submenu_size.width;
	}
	if (submenu_pos.x + submenu_size.width > get_parent_rect().position.x + get_parent_rect().size.width) {
		submenu_pos.x = this_pos.x - submenu_size.width;