I don't know Stargate: SG-1 well enough to find episode titles, so I hope people will bear with me (or one who is wiser might edit this and add them).
In a number of situations in the show, we see the wormhole open and most of the team goes through, but one person may remain for a moment to say a farewell or something, then go through the gate and the gate closes immediately after they step in it. In others, we see, from the SGC side, several team members come through the wormhole, then a pause, then the remaining member come through and the gate closes.
But there are also times when the team all walks through close to each other and the gate closes immediately after they all go through.
At the end of "Shades of Grey" (S03E18), the episode where Jack O'Neill goes undercover to find the humans stealing alien technology, he opens the gate, steps through, and keeps his hand in the gate to keep it open so others cannot close the gate and dial elsewhere.
Is there a set of rules for when the gate can close? Do they somehow signal the gate that there are a set number of people going through? Does SGC keep the gate open with a radio signal until the last team member is through?
This is one of the few times I'd accept that it's a writing issue and they do what's needed for the situation, but I'm wondering: is there an in-universe explanation for why the wormhole waits for another person, then closes, and other times it does not?
Added as an afterthought: there are also cases where they send a UAV or other probe through a gate and keep it open so they can receive telemetry. I would assume they are either using the SGC computer to keep the gate open, or that the radio signal is enough to keep it open, but that's another situation to consider, too.