The bolt is dropping late in the cycle. When you have a cap installed, the hammer can't travel far enough forward for the bolt leg to drop off the cam.
That thing that's clicking is the bolt leg dropping off the cam when you futz with the screw.
I have had 3 Piettas do this to me this year, one was bad enough that the bolt wouldn't even drop without caps installed if you slowly lowered the hammer.
You will have to remove material from the red mark on the top bolt leg in this first picture. Go slow, you don't want to weaken the bolt leg more than you have to.
View attachment 350882
The bolt is hardened, so you'll need to use something other than a file. I got by with some small stones of varying grit. I used a sharpie to cover the whole bolt leg, then cycled the action several times. You can then slowly remove material where the drag marks on the leg show up.
Continue adding sharpie, cycling, then removing material until you can hear the bolt drop off the cam when the hammer face is flush with the recoil shield as pictured.
View attachment 350883