You incorrectly imply that tech jobs will expand organically in a frontier-like or exponential fashion as happened in the past. That doesn’t actually happen in the tech sector. Tech companies seek to exclude alternative hire options from other STEM fields (engineering, science, etc.) because those alternatives would not be as cost efficient. Instead the tech jobs grow linearly (like most mature industries and systems) and only by the annual cap on visas being granted.
How you can tell that there is no absolute shortage of tech labor is that the number tech jobs never grows beyond the visa cap. If there were a shortage, companies would find more creative ways to exceed the cap limits like the above mentioned alternatives or creating training factories to increase the supply to meet organic needs/demand.
So while this mature system is not necessarily a fixed lump of labour, the mature constraints that apply seem to limit any organic growth to the current regime we find ourselves in. That is to say that companies constrain the tech labour system to their very skewed preferences instead of organic growth, and as a result the economic pie is growing less and less, and there is more and more competition over slice distribution. Incumbents are absolutely in direct competition with foreign labour and there is less overall growth to share equitably. Again, not a fixed lump of labour, but increasingly competitive to the point of very limited growth from within.