Thanks for the gif showing the issue. I guess it has gotten bugged. That was the intended way to get to the key at least. I can try to look at it tomorrow to see if I can figure out why it doesn't work.
Try not being so close to the wall when you pick it up.
Code-wise, there is a collider that checks if anything is blocking placing the object on your head. That box is apparently slightly too big and can collide with the overhang on the wall which prevents you from picking up the key. That is the only thing I manage to replicate here that prevents you from picking it up.