Hello, I had a similar problem with locking the bootloader but I finally succeeded.
In the phone we enable debugging via USB.
Connect the phone to PC.
Download ADB Installer v1.4.3 from:
ADB Installer v1.4.3
Enter the command line from the administrator level.
In the command line enter all the commands one by one as shown in the image below.
View attachment 5572453
Disconnect the phone from PC, then reboot it and enjoy Android updates again via OTA and get rid of the message when turning on the phone stating that it is unlocked.
The whole procedure was done on Android 12 Version WW-31.1004.0404.107.
Best regards and I hope you will find this information useful