Could you post some code, and a screenshot of the inspector? Alternatively, you can try using the UI Automator Viewer, which might give different results.
Also, I sometimes get this problem, and I work around it by finding a parent element and digging deeper to find the child node that you want.
Can anyone share why this happens?