The notation itself is just that, a notation. While it may seem 'clean and safe' to move differentials around as though they're just another variable, technically speaking it isn't a valid way to do mathematics.
Now, provided you understand and follow the rules, some manipulations along those lines can still arrive at a correct result albeit through potentially dubious means.
A good example of this shows up commonly in differential equations texts:
$$f(x,y)dx + g(x,y)dy = 0$$
... which, when written in proper form is:
$$\frac{dy}{dx} = -\frac{f(x,y)}{g(x,y)}$$
However, when used as a mnemonic device the former is a good way to help a student remember how to find the adjoint of the ODE and ultimately arrive at a general solution.
Under the hood, the former can be re-written as:
$$f(x,y)\frac{dx}{dt} + g(x,y)\frac{dy}{dt} = 0$$
... due to the chain rule:
$$\frac{dy}{dt}\frac{dt}{dx} = -\frac{f(x,y)}{g(x,y)}$$
... where here it must be assumed that $x(t)$ has an inverse $x^{-1}(t) = t(x)$ such that $\displaystyle\frac{1}{\frac{dt}{dx}} = \frac{dx}{dt}$ in order to arrive at the homogeneous equation. I'm probably missing some other pertinent details, but this is closer to a more correct way to work with differentials than the ad-hoc methods usually taught in differential equations texts.