### Godot version

4.2 dev1

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description

Calling `Tree.propagate_check()` after an item is unchecked does not properly uncheck the parents. They are left in partially checked state.

It's easy to observe in theme editor:

https://github.com/godotengine/godot/assets/2223172/71d0479c-0a5e-48d3-957f-d90379a95c22



### Steps to reproduce

1. Edit a Theme resource
2. Go to Manage Items... menu
3. Go to Import Items tab
4. Unfold something
5. Check and uncheck a child checkbox

### Minimal reproduction project

N/A
prev_hl_ofs = root_pos.y + Math::floor(parent_line_width / 2);
						} else {
							if (htotal >= 0) {
								RenderingServer::get_singleton()->canvas_item_add_line(ci, root_pos, Point2i(parent_pos.x + Math::floor(line_width / 2), root_pos.y), theme_cache.relationship_line_color, line_width);
							}
							RenderingServer::get_singleton()->canvas_item_add_line(ci, Point2i(parent_pos.x, root_pos.y + Math::floor(line_width / 2)), Point2i(parent_pos.x, prev_ofs + Math::floor(line_width / 2)), theme_cache.relationship_line_color, line_width);
						}
					}
				}
				prev_ofs = root_pos.y + more_prev_ofs;
			}
			if (child_h < 0) {
				if (htotal == -1) {
					break; 
				}
				if (theme_cache.draw_relationship_lines == 0) {
					return -1; 
				}
				htotal = -1;
				children_pos.y = theme_cache.offset.y + p_draw_size.height;
			} else {
				htotal += child_h;
				children_pos.y += child_h;
			}
			c = c->next;
		}
	}
	return htotal;
}
int Tree::_count_selected_items(TreeItem *p_from) const {