My emulator shows " No Internet connection" only when i run via automation

My automation framework is to launch simulator and emulator depends on input. My emulator launching fine and my app is try to load in emulator. But within that ,i can see “No Internet connection” dialogue box.
So my automation fails. When i try that manually, app is opening in emulator.
Only issue in automation.

Appium Server 2
Java 17

  UiAutomator2Options android =
                    new UiAutomator2Options()

            driver = new AndroidDriver(url, android);

No error from appium server log ,it just say unable to detect locate element locator as my app is not opening yet.
But I can see app is try to launch but “No Internet connection” pop-up coming in emulator.