It's they stay that short, how much do they tend to rely on taxable benefits?
Someone who stays a few years at the peak of above average earnings might well be highly economically beneficial even at a steep tax discount.
I don't think governments ought to compete on tax in general, but this is one where it might both be a net benefit and there is the arguable case that most tax systems are geared towards people in working age overpaying to compensate for the cost of caring for children and the elderly.
Someone who comes temporarily during working age without a discount will get the downside without the benefit.
This will be a bigger problem for the competitive ability in places with comprehensive social support mechanisms.
Given dropping birth rates, trying to offset that to be an attractive place to immigrate to may well be worth it even if most leave again - especially as long as it's profitable too.
But if your concern is that it doesn't attract people who will stay, maybe there are ways to incentivise that too. E.g. let people earn a discount where a portion does not pay out unless they stay longer.