Hello there,
I suppose you cannot lock but disconnect the resource pool.
If your project shares resources from a resource pool or from another project file, you can disconnect it from that other file. Resources with assignments in your project file remain in the project after the file is disconnected from the resource pool or other project file, but the other resources from the resource pool or other file are no longer available.
Stop sharing resources https://support.microsoft.com/en-us/office/create-and-share-a-resource-pool-in-project-desktop-64a2416e-b811-4ddf-b039-e0347e233581
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer–