It's tough to prevent technical discussions getting lost in the weeds. Actually, it's the people involved who get lost in the weeds.
What usually starts out as objective and constructive often slides into a protracted subjective and opinionated 'jousting' event. Some people end up focusing on what's personally valuable to them (or motivating for them) rather than on the goal. Some people disengage because they can't get a word in, they've been shouted down, or they've become bored. Everyone walks away frustrated that consensus wasn't reached. Or worse they leave with the illusion of consensus.
Here are some tips for keeping technical discussions out of the weeds:
First and foremost, ensure people with the right skills and experience are involved.
Avoid subjectivity by putting personal code and architecture design styles aside.
Leave egos at home. (Easier said than done!)
Use simple words and aim for clarity, i.e. avoid jargon, including pattern names. Try to develop a language, and maintain a glossary on a wiki, so that effective conversations can be had without resorting to detailed and time consuming UML and documentation (a simple UML diagram can help in many circumstances).
Articulate proposals in terms of simplicity, testability, and technical debt.
Maintain engagement with props to avoid hand waving, e.g. use a whiteboard and draw pictures.
Be patient, stay focused, and keep listening to get through the groan zone and converge at consensus. To truly understand the points other people are making, work hard to hear what they are saying from their perspective.
It's one thing to talk passionately with the courage of your convictions, but consensus cannot be reached through force of argument. Remember, you must persuade people through reason not volume.
Keep assessing the discussion. Dont argue about whether X might do Y - pull-up the code on a projector and show that X does Y. If it has become speculation stop and run a spike to gather some facts. Then reconvene.
Focus on intent. Keep asking whether the discussion is still valuable.
If you've got a facilitator handy insist they sit in on the discussion.