I've been pondering this, and I have two different answers. I can't decide which one is more to your point.
First, if this really were from a separable DE and there was an initial condition $y(x_0) = y_0,$ then I think we'd write:
$$\int_{s=x_0}^{s=x} f(y(s))\frac{dy}{ds} \; ds = \int_{t=y_0}^{t=y} f(t) \; dt.$$
So the substitution is $y = y(x)$, even though we don't know what $y(x)$ is yet.
Second thought: Maybe there isn't a substitution. Suppose $y=h(x).$ If $h'(x) = \frac{dy}{dx}$ then the definition of $dy$ and $dx$ is that they are related by the relation $dy = h'(x)\; dx$. So when we separate a DE and write
$$f(y)\frac{dy}{dx} = g(x)$$
we exploit this relation ship to write
$$f(y) \; \frac{dy}{dx} = g(x)$$
$$f(y) \; h'(x) = g(x)$$
$$f(y) \; h'(x) \; dx = g(x) \; dx$$
$$f(y) \; dy = g(x) \; dx$$
and (indefinite) integrate both sides. By this we've done no substitution, but have only observed that the differentials on each side have the same set of antiderivatives.
I hope that sheds a little light. If not, gather up all your friends and downvote me into oblivion.