TC-TSTAT-4.2: Change to use endpoint from config (#35771)

* TC-TSTAT-4.2: Change to use endpoint from config

* Add default
diff --git a/src/python_testing/TC_TSTAT_4_2.py b/src/python_testing/TC_TSTAT_4_2.py
index 8ebd2ec..387aeab 100644
--- a/src/python_testing/TC_TSTAT_4_2.py
+++ b/src/python_testing/TC_TSTAT_4_2.py
@@ -244,7 +244,7 @@
 
     @ async_test_body
     async def test_TC_TSTAT_4_2(self):
-        endpoint = self.user_params.get("endpoint", 1)
+        endpoint = self.matter_test_config.endpoint if self.matter_test_config.endpoint is not None else 1
 
         self.step("1")
         # Commission DUT - already done