### Godot version

4.1 dev2, 4.0.3

### System information

Windows 10, ryzen 5900x, radeon 6950xt (driver: 23.2.2)

### Issue description

There are two bugs:
- When I create a new node, it is created outside of the viewport. (as in first video)
- When I run the project, all the content inside the viewport dont appear. (as in second video)
I believe the second issue is related to the first.

Note: these problems are in RTL editors.

https://github.com/godotengine/godot/assets/121864036/84f0d434-0d1b-4c23-9fb0-510257e2e191


https://github.com/godotengine/godot/assets/121864036/b2bc20c7-1e2e-4d04-99e7-d66860ffced2




### Steps to reproduce

Videos explain.

### Minimal reproduction project

N/A
ERR_MAIN_THREAD_GUARD;
	ERR_FAIL_INDEX((int)p_preset, 16);
	ERR_FAIL_INDEX((int)p_resize_mode, 4);
	
	Size2 min_size = get_minimum_size();
	Size2 new_size = get_size();
	if (p_resize_mode == PRESET_MODE_MINSIZE || p_resize_mode == PRESET_MODE_KEEP_HEIGHT) {
		new_size.x = min_size.x;
	}
	if (p_resize_mode == PRESET_MODE_MINSIZE || p_resize_mode == PRESET_MODE_KEEP_WIDTH) {
		new_size.y = min_size.y;
	}
	Rect2 parent_rect = get_parent_anchorable_rect();
	real_t x = parent_rect.size.x;
	if (is_layout_rtl()) {
		x = parent_rect.size.x - x - new_size.x;
	}
	
	switch (p_preset) {
		case PRESET_TOP_LEFT:
		case PRESET_BOTTOM_LEFT:
		case PRESET_CENTER_LEFT:
		case PRESET_TOP_WIDE:
		case PRESET_BOTTOM_WIDE:
		case PRESET_LEFT_WIDE:
		case PRESET_HCENTER_WIDE:
		case PRESET_FULL_RECT:
			data.offset[0] = x * (0.0 - data.anchor[0]) + p_margin + parent_rect.position.x;
			break;
		case PRESET_CENTER_TOP: