Referencing object changes intented functionality. How to resolve?

I’m trying to reference a script that I’m calling multiple times in order to shorten the code and lessen the amount of total calls but when I do that, the functionality messes up for some reason (See example below).

    public override void Equip()
    {
        transform.parent.GetComponent<SlotState>().DoThis();
        transform.parent.GetComponent<SlotState>().DoThat);  
    }

    public override void EquipV2()
    {
        SlotState itemSlotState = transform.parent.GetComponent<SlotState>(); 
        itemSlotState.DoThis();
        itemSlotState.DoThat();
    }

The only possible way how those two versions yield a different behaviour is when “DoThis” actually destroys the SlotState component and add a new one so that the second GetComponent call gers the new instance. IF the component stays the same, there can not be a difference between those two cases. Are you sure that’s the only difference between your test cases? Maybe there’s something else going on you haven’t mentioned.