To make this fit I assume that the Galactic Barrier is a fair distance from space regularly traveled by the Federation and thus they sent the Enterprise on a separate mission so as not to divert another ship from its mission for several months.
I don't think it's even necessary to postulate that. People tend to assume that 5-year missions are somehow the default for all ships, hence your suggestion that any different mission profile is an aberration that requires justification. But there's absolutely no evidence that 5-year missions are standard. We know of exactly one starship that had a 5-year mission, namely the
Enterprise. We have never, ever heard a specific reference to any other starship at any other time being assigned to a 5-year mission, except in non-canonical sources like novels and fan reference books.
So it could just as easily be the other way around: that the norm is to assign ships to specific, focused missions of limited duration (which is actually closer to the case in a real-life navy), with the
Enterprise's extended, broad-based 5-year tour being an atypical one. Or it could be that both types of mission are commonplace. Either way, a specific mission to the galactic rim is a type of mission profile that would be pretty commonplace, not requiring any special explanation.