Connecting SSID on IOS 16 is Failing through appium automation

We have automated connecting ssid scenario in iPhone using appium for our project. This connecting ssid was working fine till IOS 15.6.1 version.
But in IOS 16 version, We are not able to connect the SSID using appium automation as Settings–>Wi-FI screen refreshes very frequently and also DOM will update frequently. The element id of each element on Wi-fi screen changes after each auto refresh. We are suspecting this is causing failure to our scripts.

The issue is happening in both Appium 1.22 and Appium 2 versions.

SETUP

DEVICE: Iphone 8
IOS Version: (16.0.3)
Appium Version: v2.0.0-beta.46
XCUITEST Version: 4.12.1
XCODE Version: 14.1
MAC Version: 12.6
Appium Inspector Version: 2022.9.1

As this is failing most of our test cases please let me know if there any way to handle this? Also please let me know if you need any other details