Two different things are called a locked PDF
The first is a permissions restriction, set with what is called an owner password. The document opens normally for anyone, but declares that it should not be printed, copied or edited. That declaration is a flag readers are asked to respect — the content itself is not protected by it. Rebuilding the document drops the flag, which is what happens here.
The second is a user password: the file is genuinely encrypted and will not open at all without it. There is nothing to work with in that case, and no honest tool can do anything about it. If your file prompts for a password just to view, this cannot help — and neither can any site claiming otherwise without the password.
If the file loads and shows its page count here, it is the first kind.