Fix a few flaky tests (#74326)

* Fix a few flaky tests

* Fix one more place
diff --git a/src/python_testing/TC_GC_2_3.py b/src/python_testing/TC_GC_2_3.py
index 6a52d6c..ea1c55f 100644
--- a/src/python_testing/TC_GC_2_3.py
+++ b/src/python_testing/TC_GC_2_3.py
@@ -176,13 +176,13 @@
                                  f"Send UpdateGroupKey command error should be {Status.AlreadyExists} instead of {e.status}")
 
         self.step(5)
+        sub.reset()
         await self.send_single_cmd(Clusters.Groupcast.Commands.UpdateGroupKey(
             groupID=groupID2,
             keySetID=keySetID1)
         )
 
         self.step(6)
-        sub.reset()
         membership_matcher = generate_membership_entry_matcher(groupID2, key_set_id=keySetID1)
         sub.await_all_expected_report_matches(expected_matchers=[membership_matcher], timeout_sec=60)
 
@@ -225,13 +225,13 @@
                                  f"Send UpdateGroupKey command error should be {Status.ConstraintError} instead of {e.status}")
 
         self.step(10)
+        sub.reset()
         await self.send_single_cmd(Clusters.Groupcast.Commands.UpdateGroupKey(
             groupID=groupID1,
             keySetID=keySetID1)
         )
 
         self.step(11)
-        sub.reset()
         membership_matcher = generate_membership_entry_matcher(groupID1, key_set_id=keySetID1)
         sub.await_all_expected_report_matches(expected_matchers=[membership_matcher], timeout_sec=60)
 
diff --git a/src/python_testing/TC_GC_2_4.py b/src/python_testing/TC_GC_2_4.py
index 87c4e44..0d3ff7f 100644
--- a/src/python_testing/TC_GC_2_4.py
+++ b/src/python_testing/TC_GC_2_4.py
@@ -213,6 +213,7 @@
                 self.mark_step_range_skipped("4c", "4d")
             else:
                 self.step("4c")
+                membership_sub.reset()
                 endpoint_2 = [endpoints_list[1]]
                 resp: Clusters.Groupcast.Commands.LeaveGroupResponse = await self.send_single_cmd(Clusters.Groupcast.Commands.LeaveGroup(
                     groupID=groupID3,
@@ -223,7 +224,6 @@
                                      f"LeaveGroupResponse cmd endpoints list {resp.endpoints} is not equal to {endpoint_2}")
 
                 self.step("4d")
-                membership_sub.reset()
                 membership_matcher = generate_membership_entry_matcher(groupID3, endpoints=[endpoints_list[0]])
                 membership_sub.await_all_expected_report_matches(expected_matchers=[membership_matcher], timeout_sec=60)
 
@@ -255,13 +255,13 @@
                                  f"Send LeaveGroup command error should be {Status.NotFound} instead of {e.status}")
 
         self.step(6)
+        membership_sub.reset()
         resp: Clusters.Groupcast.Commands.LeaveGroupResponse = await self.send_single_cmd(Clusters.Groupcast.Commands.LeaveGroup(groupID=0))
         asserts.assert_is_not_none(resp.endpoints, "LeaveGroupResponse endpoints should not be None")
         asserts.assert_equal(resp.endpoints, [],
                              f"LeaveGroupResponse cmd endpoints list {resp.endpoints} is not equal to an empty list")
 
         self.step(7)
-        membership_sub.reset()
         event_sub.wait_for_event_expect_no_report(timeout_sec=5)
 
         self.step(8)
diff --git a/src/python_testing/TC_GC_2_5.py b/src/python_testing/TC_GC_2_5.py
index 942952c..b37dcdc 100644
--- a/src/python_testing/TC_GC_2_5.py
+++ b/src/python_testing/TC_GC_2_5.py
@@ -160,13 +160,13 @@
                             f"Could not find valid AuxiliaryACL entry for FabricIndex {fabric_index}, Group G1 ({groupID1}) and Endpoint {endpoints_list[0]}")
 
         self.step(4)
+        membership_sub.reset()
         await self.send_single_cmd(Clusters.Groupcast.Commands.ConfigureAuxiliaryACL(
             groupID=groupID1,
             useAuxiliaryACL=False)
         )
 
         self.step("5a")
-        membership_sub.reset()
         membership_matcher = generate_membership_entry_matcher(groupID1, has_auxiliary_acl=False)
         membership_sub.await_all_expected_report_matches(expected_matchers=[membership_matcher], timeout_sec=60)