Android Compose findElementById fails to find element

Hi,
I have following test:

class AppiumTest {
    private lateinit var driver: AndroidDriver<MobileElement>

    @Before
    @Throws(Exception::class)
    fun setUp() {
        driver = setupAndroidAppiumDriver()
    }

    @Test
    fun simpleTest() {
        driver.findElementById("com.android.permissioncontroller:id/permission_allow_button").click()
        driver.findElementById("onboarding_skip").click()
        driver.findElementById("more").click()
        Thread.sleep(3000)
    }

    @After
    fun tearDown() {
        driver.quit()
    }
}

It fails on onboarding_skip button with exception that it can’t find element. The problem is that it’s there, and if I replace code with:

findElementByXPath("//android.view.View[@resource-id='onboarding_skip']")

it works.

If I open appium inspector, I can clearly see onboarding_skip button. But if I get timings, only xpath and UISelector return timing. id is blank:


So even here id seems to be unreachable.

What might be the issue?