Update source object of Multi-Aim Constraint dynamically

I’m trying to change the source object of a Multi-Aim Constraint dynamically using a script.

I literally see in real time how the source object is changing in the inspector at runtime, but the character doesn’t seem to react to that change. It keeps looking either at the first object I manually assign, or at nothing at all, if I don’t assign anything in the inspector.

Here it is a video showing how the inspector changes but the character not:

And here it is my code, in case it’s useful to somebody:

using UnityEngine;
using UnityEngine.Animations;
using UnityEngine.Animations.Rigging;

public class LookAtItems : MonoBehaviour
{
  public float maxLookDistance = 3.5f; // Maximum distance to look at an item
  public float rotationSpeed = 100f; // Rotation speed
  public MultiAimConstraint headAimConstraint; // Reference to the head's Multi-Aim Constraint
  public MultiAimConstraint spineAimConstraint; // Reference to the spine's Multi-Aim Constraint

  private void Update()
  {
    // Find nearby items with the "PickableItem" tag
    GameObject[] nearbyItems = GameObject.FindGameObjectsWithTag("PickableItem");

    // Return if there are no pickable items nearby
    if (nearbyItems.Length == 0)
    {
      var newSourceArray = new WeightedTransformArray { new WeightedTransform(null, 1f) };
      headAimConstraint.data.sourceObjects = newSourceArray;
      spineAimConstraint.data.sourceObjects = newSourceArray;

      return;
    }

    Transform closestItem = null;
    float closestDistance = float.MaxValue;

    foreach (var item in nearbyItems)
    {
      // Check if the item is closer than the current closest item
      float distance = Vector3.Distance(transform.position, item.transform.position);

      if (distance < maxLookDistance && distance < closestDistance)
      {
        // Check if the item is in front of the character
        Vector3 directionToItem = (item.transform.position - transform.position).normalized;
        float dotProduct = Vector3.Dot(transform.forward, directionToItem);

        if (dotProduct > 0)
        {
          closestItem = item.transform;
          closestDistance = distance;
        }
      }
    }

    // Look at the closest item
    if (closestItem != null)
    {
      Debug.Log("Looking at " + closestItem.name);

      var newSourceArray = new WeightedTransformArray { new WeightedTransform(closestItem, 1f) };
      headAimConstraint.data.sourceObjects = newSourceArray;
      spineAimConstraint.data.sourceObjects = newSourceArray;
    }
  }
}

I really hate this, I’ve spent so much time trying to learn and make this work, and now it seems like I’m stuck because of a bug I have 0 control over

I want to ask if maybe someone has came across this issue before, and if there’s any solution or workaround for now.