It is not device related or weekly rom related because it is present on different devices and weekly roms.
How to reproduce the bug:
Set "no restrictions" in battery saver for an individual app
Reboot
Check the battery optimization for that app
The setting is restored to "MIUI battery saver"