MATE 1904 - CommandAppletFactory: Invalid MIT-MAGIC-COOKIE

I use several CommandApplets in a panel in three different MATE 19.04 machines with nearly identical configurations. This is happening in only one of them.

org.mate.panel.applet.CommandAppletFactory[1594]: Invalid MIT-MAGIC-COOKIE-1 keyCannot open display

Fails for every instance of CommandApplet