How are you actually doing the head bob shake to begin with? Is it a animation or procedurally from code?
In either case, applying the head shake on that bone should work even if the class default has its pawn rotations set for pitch and yaw. ¯_(ツ)_/¯
Also a possible culprit is that the “head” bone isn’t parented to the arms. If you want arms to rotate normally yaw and pitch and the head to reflect that, the capsule isn’t actually having any pitch, only yaw (because upkeeping upright character) so I’d try to parent the head bone to the arms mesh. So, what happens is, when you move mouse, mouse X (Yaw) rotates the capsule but mouse Y (pitch) rotates the arms. If the bone with the camera is on capsule, it will only rotate on Z (Yaw) as a child of capsule but has no input on the Y (Pitch). So the hierarchy: Capsule rotates arms > arms rotate head bone > head bone does it’s thing within it’s own local space for slight wiggles and shakes.
Maybe a bit more info can help as well if the above don’t work?