Dark theme detecting on Android app - Ionic 5, Angular, Capacitor is not working

If I open it like a website in a browser - it is detecting dark theme enabled on device both on pc and mobile.

But if I build the app with capacitor and then open it on Android device as an app - it cannot detect dark theme enabled. It is always shows that app is in light mode. I tested on device with Android 10+.

I used this guide: Dark Mode - Ionic Documentation

Do you have any ideas why the issue happens and how to fix it?

I am having the same problem. Using IONIC5 + Angular. Any help?

The fix proposed on GitHub Android Dark-Mode could not be detected · Discussion #1978 · ionic-team/capacitor · GitHub does not work for me. It seemed to use the older version of the web view.

Solution from GitHub from eyecatchupon May 7 helped me.
Also, Angular + Ionic5