GameObject.SetActive(true) not working on a button click

I had a quick look through some similar questions on this, but their issues seemed to be because the script was attached to the same GameObject, and scripts can’t run on disabled GameObjects. This isn’t what’s happening on mine.

I have a UI panel that I want to enable and disable by pressing 2 different buttons. However, nothing is happening.

public GameObject SkillPanel;
public void PartySkills()
    {
        SkillPanel.SetActive(true);
        DialogueText.text = "Select a skill/spell";
    }

public void PartySkillBack()
    {
        SkillPanel.SetActive(false);
        DialogueText.text = "It's " + TurnOrder[TurnCounter].GetComponent<PlayerStats>().Name + "'s turn. Select an action";
    }

(Sorry if the code seems weird, it’s snipped out of a much larger script)

The code above is attached to a GameObject in the scene, and the functions are linked to their respective buttons.

I have no clue why I can’t get the panel to become enabled. I feel like it’s going to be something annoyingly simple, but any ideas?