1. Go to: ➝ Accessibility ➝ Volume key shortcut ➝ turn on Accessibility switch ➝ on "Shortcut service" choose/select "Accessibility Menu"|
2. Whenever the volume buttons stop working, you just need to press both volume buttons at the same time for about 3 seconds until the message "Accessibility shortcut has enabled Accessibility Menu" appears. After that the volume buttons will be working properly again!
3. Now you no longer have to restart your device whenever the bug reappears. After this procedure this issue should no longer appear, but in case the bug returns, the solution now is simple and quick. You will no longer face problems with the volume buttons when clearing your applications from memory, at least with me this has not happened anymore.
I've been facing this problem for months, but I was able to find out for myself an alternative solution to this problem. I speak Portuguese but I tried to translate this text into English. So I hope it's good! haha
In order to fulfill the basic functions of our service, the user hereby agrees to allow Xiaomi to collect, process and use personal information which shall include but not be limited to written threads, pictures, comments, replies in the Mi Community, and relevant data types listed in Xiaomi's Private Policy. By selecting "Agree", you agree to Xiaomi's Private Policy and Content Policy .