Gravity on claw "fingers" not working as intended

Godot Version

4.4.1

Question

I’m trying to make a claw machine game. I’m using the Jolt physics engine. The claw has a staticbody base with 4 claw rigidbody “fingers” attached to the base with hinge joints.

For opening and closing the claw, I enable and disable the motor on the hinges. I’m doing this using an animationplayer. After closing, I play another animation to return the claw to its original position. It works as intended, except for when the fingers collide with another body while closing. When the claw returns to its idle position the fingers stay stuck, seemingly not affected by gravity anymore.

Example video:

First grab is working correctly (no collisions). Second grab is working incorrectly, the claws should be affected by gravity when returning.

Claw code:

using Godot;
using System;
using System.Threading.Tasks;

public partial class Claw : Node3D
{
    private readonly StringName MOVE_CLAW = "move_claw";
    private const float BoundX = 7.45f;
    private const float BoundZ = -2.45f;
    private const float DropX = 0.5f;
    private const float DropZ = -0.4f;

    private enum ClawState
    {
        Idle,
        MovingX,
        XStopped,
        Xoob,
        MovingZ,
        ZStopped,
        Zoob,
        ReturningX,
        ReturningZ
    }
    
    private ClawState clawState = ClawState.Idle;
    [Export] public float ClawSpeed { get; set; } = 1f;
    [Export] public HingeJoint3D[] HingeJoints { get; set; } = new HingeJoint3D[4];
    [Export] public AnimationPlayer AnimPlayer;
    private Tween tween;
    
    public override void _Ready()
    {
        AnimPlayer.AnimationFinished += OnAnimationFinished;
    }

    public override void _PhysicsProcess(double delta)
    {
        if (clawState != ClawState.ZStopped && clawState != ClawState.ReturningX && clawState != ClawState.ReturningZ)
        {
            if (Input.IsActionPressed(MOVE_CLAW))
            {
                HandleMovement(delta);
            }

            if (Input.IsActionJustReleased(MOVE_CLAW))
            {
                HandleRelease();
            }
        }
    }

    private void HandleMovement(double delta)
    {
        switch (clawState)
        {
            case ClawState.Idle: 
            case ClawState.MovingX:
                if (Position.X < BoundX)
                {
                    clawState = ClawState.MovingX;
                    Translate(Vector3.Right * ClawSpeed * (float)delta);
                }
                else
                {
                    clawState = ClawState.Xoob;
                }
                break;
            
            case ClawState.XStopped: 
            case ClawState.MovingZ:
                if (Position.Z > BoundZ)
                {
                    clawState = ClawState.MovingZ;
                    Translate(Vector3.Forward * ClawSpeed * (float)delta);
                }
                else
                {
                    clawState = ClawState.Zoob;
                }
                break;
        }
    }

    private void HandleRelease()
    {
        switch (clawState)
        {
            case ClawState.MovingX: 
            case ClawState.Xoob:
                clawState = ClawState.XStopped;
                break;
            
            case ClawState.MovingZ:
            case ClawState.Zoob:
                clawState = ClawState.ZStopped;
                AnimPlayer.Play("open_motor");
                AnimPlayer.Queue("down");
                AnimPlayer.Queue("close_motor");
                AnimPlayer.Queue("up");
                break;
        }
    }

    private void OnAnimationFinished(StringName animName)
    {
        if (clawState == ClawState.ZStopped)
        {
            if (animName == "up")
            {
                // Return to start position (Z axis)
                Vector3 targetZAxis = new Vector3(Position.X, Position.Y, DropZ);
                float distanceZ = Position.DistanceTo(targetZAxis);
                tween = GetTree().CreateTween();
                tween.TweenProperty(this, "position", targetZAxis, distanceZ / (ClawSpeed/2));
                tween.Finished += OnReturnZTweenFinished;
                clawState = ClawState.ReturningZ;
            }
        }
    }
    
    private void OnReturnZTweenFinished()
    {
        // Return to start position (X axis)
        Vector3 targetXAxis = new Vector3(DropX, Position.Y, DropZ);
        float distanceX = Position.DistanceTo(targetXAxis);
        tween = GetTree().CreateTween();
        tween.TweenProperty(this, "position", targetXAxis, distanceX / (ClawSpeed/2));
        tween.Finished += OnReturnXTweenFinished;
        clawState = ClawState.ReturningX;
    }
    
    private void OnReturnXTweenFinished()
    {
        AnimPlayer.Queue("open_motor");
        AnimPlayer.Queue("close_motor");
        AnimPlayer.AnimationFinished += OnFinalAnimationsFinished;
    }
    
    private void OnFinalAnimationsFinished(StringName animName)
    {
        if (animName == "close_motor")
        {
            AnimPlayer.AnimationFinished -= OnFinalAnimationsFinished;
            clawState = ClawState.Idle;
            tween = null;
        }
    }

    private static float GetDistance(Vector3 from, Vector3 to)
    {
        return (from - to).Length();
    }
}