It depend, i've had a p226 tactical and the barrel fit all of my other p226 but it dosen't fit with my MK25. The ejection port of my particular MK25 was too short. The barrel needed to be modified.
Every barrel swap has a minor risk of tolerance stacking. They all should work in the 226 family but a tiny percentage of the time they don't. normally its just a tiny bit of fitting that most would do themselves, but sometimes it has to get extra help and some want that done by others. There is no logical reason this won't work but you cannot guarantee any set of parts in this. I've swapped dozens of barrels on the 226 no issue but I might be lucky.
“So in war, the way is to avoid what is strong, and strike at what is weak.”