A developer from XDA Developers forum published the app, Skip track by Volume keys for Android that allows you to switch the playing music by using the rocker volume control even when display is off.
The application does not need Root access: only need to install it and enter one command in terminal ADB computer when connected to the smartphone:
adb shell pm grant com.cilenco.skiptrack android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER
After that you must restart the smartphone. Application tested on smartphones with Android 8 Oreo Pie 9 and Q Beta. Download it here, source code is available on GitHub.