The confusion over philosophy in a culture now so dominated by science has produced a host of confusions. An older view was always to see philosophy and science as related, with science in many ways embedded in philosophy: this is due to the metaphysical boundaries at points of scientific advance. And science can founder if it tries to dominate the metaphysical core at its fringes (and core). Science produces knowledge of organisms, but founders on issues of ‘soul’, science produces cosmology, but that is always confounded by the antinomies of beginning or no beginning, etc…
It think that dismissing Schopenhauer as an idealist misses the point: his ‘transcendental idealism’ via Kant was an entirely new form of philosophy, but one clearly prefigured by Plato.
This form of philosophy was a breakthrough in many ways, but has left behind some difficult issues that science should attempt to answer.
And Nietzsche is very far from Schopenhauer: his ‘will to power’ shows how an idea of Schopenhauer (the Will in nature) can devolve in contact with science: Nietzsche was influenced by science (cf. the reign of Lange in the nineteenth century).
The collision of idealists and materialists is mostly a nonsense. It is very hard to do philosophy or science without some element of idealism, and this can coexist with materialism.
The transcendental idealism of Kant was a crucial stage of coming to see the dangers of scientism. In general the division of philosophy and science is misleading.