Please make sure to restart the app after turning off battery optimization for it.
If this does not work it means that there are some specific optimizations that can't be controlled. Unfortunately some phone manufacturers do such optimizations (not specified by the Android system) that can't be controlled neither by the user, nor by the app.