forwardX11 option not working in 18.04

sudo -E aka --preserve-env, Yeah some environment variable is required for caja to work. pkexec starts a clean environment.

Maybe SSH_AUTH_SOCK or just dbus?
You can run env command in the terminal and try to pass some of those variables to caja.

env

env will print all the environmet variables.

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY GTK_MODULES=$GTK_MODULES DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS SSH_AUTH_SOCK=$SSH_AUTH_SOCK caja

By the way, if you use sudo on gui apps, any configuration file written to home directory will be owned by root. In case caja writes a configuration file to home dir. That's something you probably don't want to do. That's why gksudo was used.