This depends on what the SELinux flag is. For example ( I can actually test this ) :
sandbox_web_t Will give the application ity’s own X session called Xephyr. Running a password manager that need to talk to browser alone here would not work, as KeepassXC cannot see outside of it’s sandbox. It does use Xephyr so you can interact with it, but it would do nothing. The clipboard would not work either. sandbox -X -w 1920x1080 -H temphome -T tmp -t sandbox_web_t KeePassXC &
Now, you can do a systemd-nspawn container run both your KeePassXC and Firefox inside of it, with similar effect, both applications would be sandboxed, you these relabe the directory you create the sandbox in to have svirt_sandbox_web_t so that the kernel does not bug out. Sometimes container_file_t is used.
As for a confined user, you might have to test that, you could create a directory and relabel everthing in that specific directory.
If the 2 apps are in the same sandbox it should work, but not if 1 is confined and the other is not. This is the effect Flatpak has at the moment, if both are flatpak the native messaging does not work. xdg-desktop-Portals is supposed to resolve this issue. . . Do not hold your breth for that feature to come to fruition. . .