I think I disagree with @gunes answer: $X|Y=y$ can be notation used to denote the random variable $X$ conditional on $Y=y$, and although it may not necessarily exist, it does in certain scenarios and has accordingly been used as notation (see notation in the example of the wiki page for conditional continuous distributions).
To answer your question, I will assume that $Y$ is a discrete RV, so that $\mathbb{1}[Y=y]$ makes sense (else it has measure zero and $X|Y=y$ may not be defined or may not make sense). Then $W=\mathbb{1}[Y=y]$ is the rv that is $1$ with probability $p = P(Y=y)$, and $0$ with probability $1-p$.
Independence is defined as $f_{X,Y} = f_Xf_Y$ assuming densities exist (let's assume so). In our case, let $Z = (X|Y=y)$. Then
$$f_{Z,W}(z,w) = P(W=w|Z=z)f_{Z}(z) = f_{W}f_{Z} \iff P(W=w|Z=z) = f_W(w)$$
Recalling our notation, we have
$$P(W=w|Z=z) = P(\mathbb{1}[Y=y] = w | (X|Y=y))$$
If $w=1$, we have $P(Y=y | X|Y=y)$. Then clearly if $X=Y$, we have that
$$P(Y=y|Y|Y=y) = P(Y=y|Y=y) = 1 \neq P(Y=y) = P(W=1) = p$$
so no, they are not independent, and you can come up with other examples where this also fails.
EDIT
Given your massive edits, I believe you are asking about the property that for an event $B$, $E[Y|B] = E[Y\mathbb{1}[B]]/P(B)$. Suppose that $T$ is either year 1 or year 2 respectively. Then
$$E[S] = E[S*\mathbb{1}[T = 1]] + E[S*\mathbb{1}[T = 2]]$$
It's unclear what $S(T)$ means, hence why we typically don't use that notation with random variables, and precisely introduce random variables defined as conditional on others, ie S|T. If you want to assume that $T$ only affects $S$ through some function $S(t)$, then you can do what you wrote in your question.