### Godot version

v4.0.1.stable.official [cacf49999]

### System information

Windows 10

### Issue description

If you use Sprite2D with a regular CompressedTexture and set a Region on it, then use a Sprite2D with a CanvasTexture and a different texture in the diffuse, and try to set a Region, the Region Editor display will show the texture from the first sprite2D node. I would expect it to show the diffuse texture from the current Sprite2D.
![image](https://user-images.githubusercontent.com/7292421/231493673-4eb152e0-81ed-4248-8465-71242c291cd2.png)
![image](https://user-images.githubusercontent.com/7292421/231493749-6173993b-e77c-4899-961e-9a055c07e351.png)




### Steps to reproduce

Make a sprite2D node
add a texture to it 
set Region to Enabled
click Edit Region under 'Region'
set any region

Make another sprite2D node
add a CanvasTexture to it
add a different texture to the Diffuse part
set Region to Enabled
click Edit Region under 'Region'
see wrong texture

### Minimal reproduction project

[RegionEditorBug.zip](https://github.com/godotengine/godot/files/11212626/RegionEditorBug.zip)

graphsbposition->set_draw_center(false);
	graphsbposition->set_border_color(error_color);
	graphsbposition->set_shadow_color(error_color * Color(1.0, 1.0, 1.0, 0.2));
	Ref<StyleBoxEmpty> graphsbslot = make_empty_stylebox(12, 0, 12, 0);
	Ref<StyleBoxFlat> smgraphsb = make_flat_stylebox(dark_color_3 * Color(1, 1, 1, 0.7), sm_margin_side, 24, sm_margin_side, gn_margin_bottom, corner_width);
	smgraphsb->set_border_width_all(border_width);
	smgraphsb->set_border_color(graphnode_bg);
	Ref<StyleBoxFlat> smgraphsbselected = make_flat_stylebox(graphnode_bg * Color(1, 1, 1, 0.9), sm_margin_side, 24, sm_margin_side, gn_margin_bottom, corner_width);
	smgraphsbselected->set_border_width_all(2 * EDSCALE + border_width);
	smgraphsbselected->set_border_color(Color(accent_color.r, accent_color.g, accent_color.b, 0.9));
	smgraphsbselected->set_shadow_size(8 * EDSCALE);
	smgraphsbselected->set_shadow_color(shadow_color);
	graphsb->set_border_width(SIDE_TOP, 24 * EDSCALE);
	graphsbselected->set_border_width(SIDE_TOP, 24 * EDSCALE);
	graphsbcomment->set_border_width(SIDE_TOP, 24 * EDSCALE);
	graphsbcommentselected->set_border_width(SIDE_TOP, 24 * EDSCALE);
	graphsb->set_corner_detail(corner_radius * EDSCALE);
	graphsbselected->set_corner_detail(corner_radius * EDSCALE);
	graphsbcomment->set_corner_detail(corner_radius * EDSCALE);
	graphsbcommentselected->set_corner_detail(corner_radius * EDSCALE);
	theme->set_stylebox("frame", "GraphNode", graphsb);
	theme->set_stylebox("selected_frame", "GraphNode", graphsbselected);
	theme->set_stylebox("breakpoint", "GraphNode", graphsbbreakpoint);
	theme->set_stylebox("position", "GraphNode", graphsbposition);
	theme->set_stylebox("slot", "GraphNode", graphsbslot);
	theme->set_stylebox("state_machine_frame", "GraphNode", smgraphsb);
	theme->set_stylebox("state_machine_selected_frame", "GraphNode", smgraphsbselected);
	Color node_decoration_color = dark_color_1.inverted();
	theme->set_color("title_color", "GraphNode", node_decoration_color);
	node_decoration_color.a = 0.7;