The device is temporarily restricted I try to install an app from Android Studio on Xiaomi Mi Max via USB.

The debug mode is on, but when I try to switch the 'Install over USB' enabled, I get 'The device is temporarily restricted' message.

Core version is 3.10.84, Android version is 7.0, MIUI version is 8 Global 7.7.20.
Finally, I got a workaround - the Wi-Fi has to be turned off and then the installation over USB works as expected.