It’s more that guilds managed the distribution of workers, so that there weren’t too many workers in a given area relative to how much work there was for them. Now, masters tended to have much more freedom than journeymen in terms of where they could go, because that’s part of what it meant to be a master, but there were still internal pressures to not overcrowd the market.
So it would depend on the local economy. If there is a scarcity of local blacksmiths, a foreign master would be readily welcomed, as masters were required to train apprentices and employ journeymen, so a new master would (over time) create new jobs in that industry. If there were a lot of local blacksmiths, there might be resistance, b/c the argument would be that additional masters would split the work too much.
In terms of enforcement, this is where guild charters came in: guild regulations had the force of law within that industry, so if you tried to move to a city after being refused permission (and thus weren’t licensed), you could be sued in court and the local gendarmes could expel you from the city.
There are excellent fictive examples of this in two of Guy Gavriel Kay’s works, The Lions of Al-Rassan and The Sarantine Mosaic.
In the latter, a doctor from a numbers-filed-off Persia moves to numbers-filed-off Constantinople under Justinian, and hangs out his shingle with absolutely no goddamn clue of the local laws, regulations, and culture surrounding such things, because he’s a foreigner from a small town.
He then has to contend with the fact that he’s angered his local colleagues, he’s set up a commercial business in a residential home (yes, they had zoning laws back then! Often very stringent ones!) that is disrupting street traffic, and that some of his medical techniques may violate local laws and religious custom, which draws unwelcome attention from the church as he’s an unbeliever in a state with a state religion.
One of the things he does to smooth things over is… agree to give lectures and talks on basic medical techniques to students, a task that none of the local masters want to do at all but which they’re required by their guild charter to devote time too for the good of the state and the profession.
I like the “none of the local masters” wanting to teach students; history changes everything, except certain aspects of academic culture.