Locking guides is an application function, it is not stored in the file. Therefore, you will need to do the following:
* Create an action. Use the insert menu command for a single step action using the "lock guides" command.
* Create a new File > Scripts > Scripts Events Manager... Tick the enable checkbox.
* Use the lower section to select the "open document" event to play the action set and action to lock guides, then add it to the list of events in the upper section.
Now every time you open a file, the guides will be automatically locked.
https://www.designeasy.co/2018/06/how-to-automate-boring-tasks-using.html
https://photoshoptrainingchannel.com/using-the-script-events-manager-in-adobe-photoshop/