Should a lawmaker or a relationship counsellor know any philosophy? After all, should they learn how arbitrary and groundless much of their disciplines are, they may be disillusioned, and thenceforth will always have a vague awareness of the fact that what they're doing is false.
The premise here is the same as your premise for mathematicians and scientists: that to be sheltered and have conviction in an uncritical tradition of thought would make them more efficient at their craft. This may be true, for what Kuhn would call 'normal' scientists, who in any case make up the majority of working researchers; and assuming that not all scientists could be 'revolutionary' scientists even if they all tried, perhaps then not everyone benefits from having the insight to be detached in the way that allowed Newton to simply posit action-at-a-distance without worrying about a mechanism, or engaged in the way that allowed Einstein to really plumb the notion that inertial mass and gravitational mass being the same. Let us try to entertain an 'average' scientist who we suppose is constitutionally unable to revolutionise science.
What would it even mean, to be unable to revolutionise science, and (for that reason) could not benefit from philosophy? Why would such an impairment exist in someone who is otherwise a good researcher, either as a theorist or an experimentalist? I find it difficult to imagine, failing some very definite theory of psychology which would allow me to see a mechanism for it to happen. So perhaps this thought experiment is not particularly useful. Indeed, revolutionising science is not a usual thing to expect from a scientist, so asking what causes a scientist to fail to revolutionise science feels as though the question is backwards. So does this mean that the notion of a "constitutionally normal scientist" is artificial? I would say, in fact, that it does.
But never mind scientific revolution — whatever it involves, it is not easy; or if it were easy, it would become banal, and we wouldn't call it revolution any more than inventing a device is revolutionary (ie. we would mainly do so as an exaggeration, for funding or marketing purposes). Let us suppose that doing "normal" science is what we should expect a scientist to end up doing in practise, and ask how philosophy could possibly be of use; and if we can't think of any, perhaps we should shelter scientists and mathematicians from any contact with it, lest it shatter their "faith" of how to operate and teach others, wilco which makes them more efficient at their jobs.
But this notion is based on a false premise — that there is a sharp dividing line between "normal" science and "revolutionary" science. Certainly, that which we call scientific revolution is uncommon; but as I've hinted above, that's because we reserve the word 'revolution' for changes of a certain magnitude which is large enough to be rare (while noting that it seems that it is easier to make small advances than large). There are advances which, while not revolutionary, were quite important, such as Maxwell formulating his equations of electromagnetism and Poincaré's early work on Topology, which required imagination, insight, and some specific principles on which to operate to extend the existing theory; and important but still lesser advances than this, such as Rutherford's proposal of atomic nuclei from surprising particle scattering results and Fourier's theory of decomposing continuous functions into combinations of trigonometric functions. There is a spectrum, all the way down to routine calculational exercises, in which imagination is required to arrive at a meaningful answer, and sometimes even to ask a meaningful question. Those without such imagination don't write papers worth publishing. And how should one direct one's imagination? One must impose certain constraints beyond those just of the existing discipline in order to exercise their imagination most efficiently. How does one choose such constraints most effectively, if not by considerations that would best be described as philosophical? Maybe knowing Popper's work (let alone Sartre or Heidegger) is not directly constructive for eg. a string theorist or an ecologist, but having a broad perspective of the range of ways to think — and forming personal judgments about them — extend the range of the imagination and helps to define it, like stretching and giving tone to a muscle.
If we're convinced some philosophy is necessary to guide the imaginative process required for research, perhaps it is not necessary to be an effective teacher, who can restrain themselves to presenting the existing discipline. But perhaps that's also already a false assumption: if your students are to be successful, shouldn't you teach intuitions as well as the discipline, so that when they (or their students) proceed to research, they already have some guide for their imagination? And of course, if they are engaged students, they will challenge the things which you teach. A teacher who shocks their students by simply pulling a formula from thin air, without a justification or intuition to help them to understand it, is a poor one. They should at least try to have enough perspective to understand that their discipline makes demands of the imagination which must be supported, or else the only students they will have are ones which accept things by rote and which cannot actually engage with it except to observe simple corrolaries to the existing results of the field.
So — some imagination and some perspective are required to be either a good researcher or a good teacher, and philosophy is one way in which these can be exercised. Is it the best way to do so? Certainly some personal, independent reflection is necessary, and it is difficult to separate foundational or exploratory contemplation of science from metaphysics, at the least. If they should decide to read any published philosophers on the matter, this may or may not be a good use of time, depending on what problems they are concerning themselves with. But thinking seriously about the edges of their field, and reading others who can communicate well about how to think about things in a very general manner, will tend to make them better at formulating their own goals, and communicating what might otherwise be very obscure and specialised results to a broader audience, which is productive to one's career as a scientific researcher.
All of the above, I present without any experimental support, but as an attempt to provide some sort of picture of what the scientific enterprise looks like to me — on the largest historical scales, and on the smallest personal scale; and it looks to me to be an enterprise which is fuelled by leaps of the imagination, both at the research and the pedagogical level, which are guided by metaphysical and epistemological principles to the extent that these imaginative leaps are not achieved by sheer luck. If philosophy is capable of disillusioning a teacher or researcher, that would suggest ipso facto that the basis for their teaching or research was an illusion, and that if they were successful, it was either through sheer luck (which by definition is unreliable) or because the principles which they used were not badly wrong, in which case further contemplation may allow them not only to be reassured, but possibly yet more effective.