If players go afk then chances are they also didn't roll on loot, which means you can't dismiss anyone until that disappears and no one is going to wait the 5mins for it and will pull straight in to the next fight. Only thing you can do really is report the players for gameplay disruption I suppose...