To elaborate on and give context to previous answers, we expand on the use of mean-field variational assumptions in machine learning. The question can be decomposed into two main parts: 1) The definition of the mean-field distribution, and 2) How the mean-field distribution is optimized in variational inference.
Part 1:
The goal of variational inference is to estimate a surrogate distribution $q_{\phi}(z)$ for latent variables $z_{i} \in z$ to approximate a posterior distribution $p(z \vert x)$ as a function of a collected dataset $x$. As mentioned, your question mainly focuses on the mean-field assumption that factorizes the joint distribution into a set of independent latent factors
\begin{equation}
\begin{split}
q_{\phi}(z) \: &= \: \prod_{i}^{\text{N}} \: {q_\phi}_{i} (z_{i})
\end{split}
\end{equation}
where $\phi$ refers to a particular family of distribution. It is this distribution that is used in lieu of the true posterior for modeling purposes.
Part 2:
Your reference to how the distribution is expressed as a constant seems to refer to how the surrogate distribution as a whole, and consequently, each latent factor $q_{\phi_{j}}(z_{j})$ is optimized. To optimize latent factor $q_{\phi_{j}}(z_{j})$, mean-field variational inference assumes that all latents $i \not = j$ are set as constant. The optimal solution $q*$ for each latent distribution is derived to be
\begin{equation}
\begin{split}
q_{\phi_{j}} (z_{j}) \: \approx \: \text{exp} \big( \: \mathbb{E}_{i \ne j} \: \big\lbrack \: \log p(z_{j}, x \vert \: z_{\neg_{j}}) \: \big\rbrack \: \big)
\end{split}
\end{equation}
where we have defined the distribution
\begin{equation}
\begin{split}
\log ~\widetilde{p}(z_{j}, x) \: &= \: \mathbb{E}_{i \ne j} \: \big\lbrack \: \log p(z_{j}, x \vert z_{\neg_{j}}) \: \big\rbrack \: + \: \text{C}
\end{split}
\end{equation}
\begin{equation}
\begin{split}
\mathbb{E}_{i \ne j} \: \big\lbrack \: \log p(z_{j}, x \vert z_{\neg_{j}}) \: \big\rbrack \: &= \: \int \: \log p(z_{j}, x \vert z_{\neg_{j}}) \cdot \prod_{\substack{i=1 \\ i \ne j}}^{\text{N}} q_{\phi_{i}(z_{i})} \: dz_{i}
\end{split}
\end{equation}
given a proportionality constant $C$. In practice, the optimization of each factor $q_{\phi_{j}}(z_{j})$ for $j \in \lbrace 1,2, \ldots \text{N} \rbrace$ follows an iterative strategy, hold $q_{\phi_{i \ne j}}$ fixed and maximize $\mathcal{L}_{elbo}$ with respect to the $z_{j}$ latent variable.
The following excerpts are taken from my book on variational inference. Learn more on the topic by visiting https://www.thevariationalbook.com/