Inspector does not recognize gameobject when run- claims not connected

I’m working on a project to help people keep track of their home’s inventory.
I created a panel in the hierarchy and had set it as a game object in code and hidden. I then had two functions, one to open it, and one to close it. When I run the program, it gives me an exemption UnassignedReferenceException: The variable DialogCanvas of PaintSiding has not been assigned.
You probably need to assign the DialogCanvas variable of the PaintSiding script in the inspector.

I used almost the exact same code to switch between the different categories and it works just fine. I don’t understand it. I’m using 2022.3.0. I even uninstalled Unity and removed all registry entries and reinstalled it after a defrag. That usually fixes most everything, but this is just crazy.
Anyone else having troubles?

Search the scene for your script and make sure all instances have it assigned.