The effect is not straightforward and seems to be positive, by raising the economic incentive to train in healthcare.
This paper on a sudden loosening in US nursing visa rules found that nursing enrollment in the Philippines jumped from 90,000 p.a. to 400,000, and the number of nurses working in the Philippines increased. It didn't completely plug the nursing shortages there though, because of low wages. Many of the 'surplus' nurses went to work as nurses in the Philippines, but many went to work in higher paying domestic sectors.
https://voxdev.org/topic/migration-urbanisation/brain-drain-vs-brain-gain-does-international-migration-deplete-poor
Now you could argue that even if NHS worker immigration doesn't deprive the source countries of healthcare workers, it's depriving them of the (eg) would-be engineers who decided to become doctors instead, because of the international earning potential.
But that seems flimsy unless you think that human talent has basically been fully utilized.
I see no evidence for that (though AI may change this very soon). There are billions of people who have the talent and drive to contribute more to the economy (and themselves and their families) but who lack the opportunity to do so. Essentially, a mismatch of talent and opportunity.
Immigration done right addresses that.
What we need to do is drop the squeamishness about discussing good immigration and bad immigration. Then design policies to maximise the former while limiting the latter.
Political difference will still exist on what counts as good and bad immigration, but that's the debate that should be had.
And unlock supply of resources! Housing reform, planning reform, NHS reform, so that supply rises to meet demand.
Otherwise most of the economic benefits of migration get captured by landlords, as owners of the scarce resource, and everyone else is left scratching their heads wondering where these supposed benefits have gone. They've gone to people like me who own property, because the government has imposed an artificial constraint on supply. That's not how the system should be working. It works for the people who vote though, so it stays.