incorrect mapping from brightness slider to real system values
Maybe everytime you unlock the screen, the phone sets the brightness to the current brightness value specified (set) by the slider.

This is something that has to be changed in the framework-res.apk .

If you know how to edit it using APKtool, just proceed.

Otherwise, the most easiest way is using a Tasker app.
Just add a task to set (echo) the brightness to 255 everytime screen is unlocked.