I noticed a change in the default behaviour of 7-Zip 25.01 when using password protection, but I could be wrong. The default behaviour now is to leave the content list unencrypted and only encrypt the files in the archive.
Add the following option to your 7-Zip command line sequence to encrypt the archive list when using the -p option.
-mhe=on