This is because “philosophy” and “science” sometimes refer not to the content of a given assertion but to the grounds on which it is made.
The famous example is Kant’s allegation that space is necessarily Euclidean.
Because Kant made this statement not on experiential, but on purely conceptual grounds, it was, in the context in which he made it, a philosophical, as opposed to a scientific assertion.
It was later proved that physical space is not Euclidean. And it was also proved that we do not necessarily perceive it as being Euclidean. (These were different proofs.)
For the same reason mutatis mutandis, philosophical argumentation can disprove scientific propositions. On the basis of observance of the scientific method, it was asserted length was a strictly additive quantity. It was later proven, initially on purely philosophical grounds, that this is not necessarily true. Soon thereafter, it was proved, this time on scientific grounds, that, as a matter of empirical fact, length is not a strictly additive quantity.
So yes—-science sometimes disproves philosophy, the reason being that empirically true propositions are sometimes denied on philosophical grounds.
And philosophy sometimes disproves science, since conceptually true propositions are sometimes denied on empirical grounds.
Be it noted that any given science has a purely conceptual component, and the oft-mentioned opposition between science and philosophy is therefore largely non-existent.