Some content in hybrid app webview appears in the page source xml when running on emulator but does not appear when running on real device

Any reason why an android.view.View element inside a android.webkit.WebView element is not appearing in the page source when running on real device, but appears when running on emulator?
Basically my test passes on emulator, but on real device although I can see the elements I want to interact with, they are not present in the page source xml.
I am using appium2 server and appium java client 8.3.0 with emulator and real device both with Android 11

Have you checked it with Appium Inspector? How do you know they are not presenting page source xml?

Hello. I evaluated the driver.getPageSource() during each execution of the test (on emulator and on real device) and the only difference between the two xml is that missing android.view.View element (and its content) that appears in the page source on the emulator and does not appear in the page source on the real device

I also just checked manually with the appium inspector, and is the same problem like in the automated test. On real device the element does not appear in the page source (although I can actually see it on the screen) and on emulator it appears in the page source xml and on the screen.