Invariant four-variable automorphic kernel functions