While (apparently successfully) loading a sketch in 1.8.19 I had a message some 'invalid' libaries had been found. I believe these are somehow related to my trying v 2.0 recently. And to
Here's a list of the 'package prefixed' entries.
Although a few have several levels of subfolder, there are no files in any of them.
You are correct. Arduino IDE 2.x/Arduino CLI extract the downloaded library archive to a folder with a name of this format before finally moving it to the target folder name.
My suspicion is that your antivirus software does an "on access"/"real time" scan of these folders when they are created, which interferes with the library installation process. You may be able to avoid this by adding the relevant process or path to the "allow list" of your antivirus software.