No, your $\beta_2S$ is $\beta S$, the Čech-Stone compactification of $S$.
As an example let $S=\omega$ and $P=\omega+1$ (with order topology, so it is just the converging sequence). Let $g$ be the characteristic function of the diagonal $\Delta=\{\langle n,n\rangle:n\in\omega\}$.
It has no continuous extension to $\beta S\times P$ because the closure of $\Delta$ and the closure of the top line $\omega\times\{\omega\}$ intersect (the intersection is $(\beta\omega\setminus\omega)\times\{\omega\}$); at the points in the intersection the extension should assume both values $0$ and $1$.
Addendum (2024-10-06): In Stone-Čech compactifications of products Glicksberg characterized when $\beta X\times\beta Y=\beta(X\times Y)$ (also for arbitrary products): in the non-trivial case, where $X$ and $Y$ are infinite, the product $X\times Y$ should be pseudocompact.