Unable to run snap on Ubuntu 22.04

I am trying to run an electron snap for Ubuntu 22.04 but after installing to the snap store, I encounter a permissions issue when trying to create a directory in the root user folder. Is this a know error with snap on Ubuntu 22 or is this related to a snap configuration?

Error: root@tylerg:~# sudo test-electron mkdir: cannot create directory ‘/run/user/0’: Permission denied

why exactly are you trying to run a graphical app as root ?