Read the entire thread (unfortunately it also contains a lot of silent messages that are only visible to power users):
According to my tests neither a WakeLock extension nor the thereby declared permission REQUEST_IGNORE_BATTERY_OPTIMIZATIONS is needed to prevent Doze mode (on Android 6+).
In addition, the permission REQUEST_IGNORE_BATTERY_OPTIMIZATIONS is rejected by Google and the app is not allowed in the Play Store.