ok, great.
Do you know to tell which selenium-api version you use?
look at the jar file selenium-api-4.8.2.jar or similar…
If you use selenium 4.8.2 or above then, please checkout my workaround here(you can try it anyway if you want, assuming you use maven): https://github.com/appium/java-client/issues/1872#issuecomment-1484017595
If you will find it beneficial please write here so others will know as well.