### Tested versions

v4.2.stable.official [46dc27791]

### System information

Windows 11- Godot v4.2.stable.official [46dc27791] - Vulkan (Forward+)

### Issue description

![image](https://github.com/godotengine/godot/assets/46812028/f57e3f30-b3c4-4a83-8793-64a58bd18220)


### Steps to reproduce

Create a new project and select a color in modulate

### Minimal reproduction project (MRP)

N/A
target_image->blit_rect(img, Rect2i(Point2i(0, 0), img->get_size()), w->get_position());
		}
		picker_texture_rect->set_texture(ImageTexture::create_from_image(target_image));
	}
	picker_window->set_size(screen_rect.size);
	picker_preview->set_size(screen_rect.size / 10.0); 
	picker_window->popup();
}
void ColorPicker::_picker_texture_input(const Ref<InputEvent> &p_event) {
	if (!is_inside_tree()) {
		return;
	}
	Ref<InputEventMouseButton> bev = p_event;
	if (bev.is_valid() && bev->get_button_index() == MouseButton::LEFT && !bev->is_pressed()) {
		set_pick_color(picker_color);
		emit_signal(SNAME("color_changed"), color);
		picker_window->hide();
	}
	Ref<InputEventMouseMotion> mev = p_event;
	if (mev.is_valid()) {
		Ref<Image> img = picker_texture_rect->get_texture()->get_image();
		if (img.is_valid() && !img->is_empty()) {
			Vector2 ofs = mev->get_position();
			picker_color = img->get_pixel(ofs.x, ofs.y);
			picker_preview_style_box->set_bg_color(picker_color);
			picker_preview_label->set_self_modulate(picker_color.get_luminance() < 0.5 ? Color(1.0f, 1.0f, 1.0f) : Color(0.0f, 0.0f, 0.0f));
		}
	}
}
void ColorPicker::_html_focus_exit() {