Thanks @CrashyBang and @KaMiila, your solutions worked wonderfully for my similar issue with Discord Flatpak. I'll detail my exact procedure for anyone else:
Step 1: Add the following lines to ~/.xinitrc (before the line that starts WM)
mkdir -p "$HOME/.cache/xdg_runtime_dir"
export XDG_RUNTIME_DIR="$HOME/.cache/xdg_runtime_dir"
Step 2: Create a script (mine is ~/.local/bin/Discord) with the following lines