it is getting flashed every time I unlock or lock the bootloader. Below are the steps I took to lock and unlock.
1) Enabling the developer options.
2) Enabling OEM unlocking and USB debugging.
3) Entered the fast boot mode and used "fastboot oem unlock" command to unlock the device after this...