ScriptEditorService: Attempt to use a closed document

Hi, I’m struggling to figure out what causes this error:

RobloxStudioBeta_anJFh0xkwD

As it shows up, those lines below are erroring but this is not what I actually asked for. Once upon calling GetScript on the document:

RobloxStudioBeta_Qzvkp2dwbH

RobloxStudioBeta_wGuuwEoVQ6

The error appears on the output in only one of my places, yet I want to guarantee that the plugin works in every place. I’ve tried other places like this local place but it seems to happen only in that place! Do you know how to solve it?