First, sorry for duplication. I've noticed How does the functor $F: \textbf{C}/C \to \textbf{C}$ "forget about the base object" $C$?, but answers there didn't solve my confusion, and my reputation is not enough for commenting on answers, so I want to ask it again, with clearer words.
I'm reading Awodey's textbook on Category theory. He said for a slice category $\mathbf{C}/C$, there is a functor $U:\mathbf{C}/C\to\mathbf{C}$ that "forgets about the base object $C$". $U$ is not defined in the textbook, but after some search on the internet, seems it should be
$$ [f_1\stackrel{g}{\to}f_2]\mapsto[\mathsf{dom}f_1\stackrel{g}{\to}\mathsf{dom}f_2] $$
But according to the definition of slice category, arrows from $C$ to $C$ should also be objects in $\textbf{C}/C$, so after applying $U$, $C$ should be created by them. If this is true, what does it mean to "forget about $C$"?
Take a concrete example. This is category $\mathbf{C}$, identity arrows are omitted.
X
↓ ↘f
↓ ↘
h↓ C
↓ ↗
↓ ↗g
Y
There are 3 arrows pointing to $C$: $f$, $g$ and $1_C$. So according to the definition, $\mathbf{C}/C$ is
f
↓ ↘f
↓ ↘
h↓ 1_C
↓ ↗
↓ ↗g
g
Apply $U$ to $\mathbf{C}/C$, then each object becomes its domain, and arrows are the same, so that gives us $\mathbf{C}$ again.
You should not think of $C$ as being forgotten in the sense that it is no longer in the category. In fact, as you already found out yourself, we can always find $C$ back in the image of the forgetful functor $U: \mathbf{C} / C \to \mathbf{C}$, since $U(Id_C) = C$.
The objects in $\mathbf{C} / C$ have quite a bit of information. They are arrows $f: D \to C$. Suppose for example that we have two parallel (and distinct) arrows $f,g: D \to C$ in $\mathbf{C}$. Then they will be different objects in $\mathbf{C} / C$. This information is lost ("forgotten") when we consider their images under the forgetful functor: $U(f) = U(g) = D$.
So 'forgetting' is more of a local property than a global one.