Does locking folders prevent .DS_Store being deleted in certain cases?
Yes, locking a folder prevents any files/folders immediately inside of it from being modified, as well as deleting/renaming the folder itself. Items in sub-folders can be edited though.
I should note that the command you had in your question does not delete any DS_Store files, it simply stops them from being created on network volumes.
I'll assume you want to run a find command which deletes all DS_Stores, and yes locking a folder will prevent that from modifying the files in it.