"Error: unexpected server response (404)" shows after switch context(webview) in android emulator M1

Hi,

I have M1 chip system. And Instead of using chrome driver path in set system property, I wanna used below code and POM file to install the expected chrome driver according to my emulator chrome version.

In my emulator class, I have below code:
WebDriverManager.chromedriver().driverVersion(“91.0.4472”).setup();
WebDriver driver = new ChromeDriver(new ChromeOptions());
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);// To wait for driver

In appiumService class
.withArgument(() ->"–allow-insecure",“chromedriver_autodownload”)
.withArgument(() ->"–allow-insecure",“adb_shell”)

POM

org.seleniumhq.selenium
selenium-chrome-driver
4.2.1


io.github.bonigarcia
webdrivermanager
5.1.1

Logs:
The ‘loggingPrefs’ cap is deprecated; use the ‘chromeLoggingPrefs’ cap instead
[Chromedriver] Set chromedriver binary as: /opt/homebrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver_mac64_v91.0.4472.101
[Chromedriver] No old chromedrivers seem to exist
[Chromedriver] Spawning chromedriver with: /opt/homebrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver_mac64_v91.0.4472.101 --url-base=wd/hub --port=8000 --adb-port=5037 --verbose
[WD Proxy] connect ECONNREFUSED 127.0.0.1:8000
[Chromedriver] Starting W3C Chromedriver session with capabilities: {
[Chromedriver] “capabilities”: {
[Chromedriver] “alwaysMatch”: {
[Chromedriver] “goog:chromeOptions”: {
[Chromedriver] “androidPackage”: “qat”,
[Chromedriver] “androidUseRunningApp”: true,
[Chromedriver] “androidProcess”: “.qat”,
[Chromedriver] “androidDeviceSerial”: “emulator-5554”
[Chromedriver] },
[Chromedriver] “goog:loggingPrefs”: {
[Chromedriver] “browser”: “ALL”
[Chromedriver] }
[Chromedriver] }
[Chromedriver] }
[Chromedriver] }
[WD Proxy] Determined the downstream protocol as ‘W3C’
[HTTP] <-- POST /wd/hub/session/8e3f3dd1-bf8d-49a6-995c-8acebc917d48/context 200 752 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/8e3f3dd1-bf8d-49a6-995c-8acebc917d48/element
[HTTP] {“using”:“xpath”,“value”:"/html/body/div[2]/form/div[1]/div[2]/fieldset/table/tbody/tr[3]/td[1]/label"}
[W3C (8e3f3dd1)] Driver proxy active, passing request on via HTTP proxy
[WD Proxy] Got response with status 404: {“value”:{“error”:“no such element”,“message”:"no such element: Unable to locate element:

Same element works fine if i use chromedriver path in desired capability. But i wanna use webdrivermanager class as our QAs have different MAC and I wanna this in all machine.