Android app, communication problems

Some time ago, I tried to notice such a problem:
If you log in to the application, everything can work fine, the sensors will be updated, and the buttons will work. But after a certain, indefinite time (possibly restarting the RPI client and re-authorizing it), control from the application is lost completely (usually), or partially (sometimes).

That is, I either see the latest data in the sensors, but no events (slider, button) are sent to the server (the client at the moment is perfectly controlled with web gui, but events with the android app do not come). Or the equipment is designated as offline, which happens more often, and even the data from the sensors is not updated. But at the same time, again, everything works well from web ui. Only one thing helps - logout - login in the application. And immediately it becomes online, and everything is managed as it should.

See this bug on 3 android devices: Android 10 + miui, clean Android 7 and Android 9 + miui.
Rpi 3 by cable (reconnection by bad signal on gateway is about one on week), soft - python 3 code with last published libs.
Logic - 2 sliders on dashboard for selecting the mode, and about 15 indicators (ds sensors).

Can you help with fixing this issue, or say how to use alternative dashboard?

you cannot keep the app in background. once this issue occur just restarting the app solves this issue.

Restarting app is not solve this problem. Only logout/login again in app