Since you have two binary response variables in your analysis, there are four possible outcomes taken over those two variables. Hence, it makes sense to use some kind of regression model with a discrete four-category response ---e.g., the multinomial logistic regression model. The model form for this model can be written as:
$$\begin{equation} \begin{aligned}
\mathbb{P}(Y_{1i}=0,Y_{2i}=0 | x_i, s_i)
&= \frac{1}{1 + e^{\beta_{01} x_i + \gamma_{01} s_i}+e^{\beta_{10} x_i + \gamma_{10} s_i}+e^{\beta_{11} x_i + \gamma_{11} s_i}}, \\[10pt]
\mathbb{P}(Y_{1i}=0,Y_{2i}=1 | x_i, s_i)
&= \frac{e^{\beta_{01} x_i + \gamma_{01} s_i}}{1 + e^{\beta_{01} x_i + \gamma_{01} s_i}+e^{\beta_{10} x_i + \gamma_{10} s_i}+e^{\beta_{11} x_i + \gamma_{11} s_i}}, \\[10pt]
\mathbb{P}(Y_{1i}=1,Y_{2i}=0 | x_i, s_i)
&= \frac{e^{\beta_{10} x_i + \gamma_{10} s_i}}{1 + e^{\beta_{01} x_i + \gamma_{01} s_i}+e^{\beta_{10} x_i + \gamma_{10} s_i}+e^{\beta_{11} x_i + \gamma_{11} s_i}}, \\[10pt]
\mathbb{P}(Y_{1i}=1,Y_{2i}=1 | x_i, s_i)
&= \frac{e^{\beta_{11} x_i + \gamma_{11} s_i}}{1 + e^{\beta_{01} x_i + \gamma_{01} s_i}+e^{\beta_{10} x_i + \gamma_{10} s_i}+e^{\beta_{11} x_i + \gamma_{11} s_i}}. \\[10pt]
\end{aligned} \end{equation}$$
In this model form you have unknown coefficients $\beta_{01}, \beta_{10}, \beta_{11}$ that describe the effect of $x_i$ and you have coefficients $\gamma_{01}, \gamma_{10}, \gamma_{11}$ that describe the effect of $s_i$. This gives you a basic model you can fit to your data. If you are interested in testing a hypothesis relating to the correlation between the response variables then you will need to frame this hypothesis in terms of the underlying parameters of the model. To do this you will need to use some algebra to derive the relevant correlation expressions in terms of these parameters.
Finding the correlation formulae: With a bit of algebra, we can show that the true covariance between the two response variables is:
$$\begin{equation} \begin{aligned}
\mathbb{Cov}(Y_{1i}, Y_{2i} | x_i,s_i)
&= \mathbb{E}(Y_{1i} \cdot Y_{2i} | x_i,s_i) - \mathbb{E}(Y_{1i} | x_i,s_i) \cdot \mathbb{E}(Y_{1i} | x_i,s_i) \\[10pt]
&= \mathbb{P}(Y_{1i} =1, Y_{2i}=1 | x_i,s_i) - \mathbb{P}(Y_{1i} =1 | x_i,s_i) \cdot \mathbb{P}(Y_{1i}=1 | x_i,s_i) \\[10pt]
&= \frac{e^{\beta_{11} x_i + \gamma_{11} s_i} (1- e^{\beta_{11} x_i + \gamma_{11} s_i})}{(1 + e^{\beta_{01} x_i + \gamma_{01} s_i}+e^{\beta_{10} x_i + \gamma_{10} s_i}+e^{\beta_{11} x_i + \gamma_{11} s_i})^2}. \\[10pt]
\end{aligned} \end{equation}$$
For the variances, with a bit more algebra we get:
$$\begin{equation} \begin{aligned}
\mathbb{V}(Y_{1i} | x_i,s_i)
&= \frac{(e^{\beta_{10} x_i + \gamma_{10} s_i} + e^{\beta_{11} x_i + \gamma_{11} s_i} )(1- e^{\beta_{10} x_i + \gamma_{10} s_i}- e^{\beta_{11} x_i + \gamma_{11} s_i})}{(1 + e^{\beta_{01} x_i + \gamma_{01} s_i}+e^{\beta_{10} x_i + \gamma_{10} s_i}+e^{\beta_{11} x_i + \gamma_{11} s_i})^2}, \\[10pt]
\mathbb{V}(Y_{2i} | x_i,s_i)
&= \frac{(e^{\beta_{01} x_i + \gamma_{01} s_i} + e^{\beta_{11} x_i + \gamma_{11} s_i} )(1- e^{\beta_{01} x_i + \gamma_{01} s_i}- e^{\beta_{11} x_i + \gamma_{11} s_i})}{(1 + e^{\beta_{01} x_i + \gamma_{01} s_i}+e^{\beta_{10} x_i + \gamma_{10} s_i}+e^{\beta_{11} x_i + \gamma_{11} s_i})^2}. \\[10pt]
\end{aligned} \end{equation}$$
Hence, we obtain the correlation formula:
$$\begin{equation} \begin{aligned}
\mathbb{Corr}(Y_{1i},Y_{2i} | x_i,s_i)
&= \frac{(e^{\beta_{10} x_i + \gamma_{10} s_i} + e^{\beta_{11} x_i + \gamma_{11} s_i} )(1- e^{\beta_{10} x_i + \gamma_{10} s_i}- e^{\beta_{11} x_i + \gamma_{11} s_i})}{\sqrt{(e^{\beta_{10} x_i + \gamma_{10} s_i} + e^{\beta_{11} x_i + \gamma_{11} s_i} )(1- e^{\beta_{10} x_i + \gamma_{10} s_i}- e^{\beta_{11} x_i + \gamma_{11} s_i}) \\ \cdot (e^{\beta_{01} x_i + \gamma_{01} s_i} + e^{\beta_{11} x_i + \gamma_{11} s_i} )(1- e^{\beta_{01} x_i + \gamma_{01} s_i}- e^{\beta_{11} x_i + \gamma_{11} s_i})}}. \\[10pt]
\end{aligned} \end{equation}$$
So the particular correlation formulae for $s_i=0$ and $s_i=1$ are:
$$\begin{equation} \begin{aligned}
\mathbb{Corr}(Y_{1i},Y_{2i} | x_i,s_i=0)
&= \frac{(e^{\beta_{10} x_i} + e^{\beta_{11} x_i})(1- e^{\beta_{10} x_i}- e^{\beta_{11} x_i})}{\sqrt{(e^{\beta_{10} x_i} + e^{\beta_{11} x_i} )(1- e^{\beta_{10} x_i}- e^{\beta_{11} x_i}) (e^{\beta_{01} x_i} + e^{\beta_{11} x_i})(1- e^{\beta_{01} x_i}- e^{\beta_{11} x_i})}}, \\[10pt]
\mathbb{Corr}(Y_{1i},Y_{2i} | x_i,s_i=1)
&= \frac{(e^{\beta_{10} x_i + \gamma_{10}} + e^{\beta_{11} x_i + \gamma_{11}} )(1- e^{\beta_{10} x_i + \gamma_{10}}- e^{\beta_{11} x_i + \gamma_{11}})}{\sqrt{(e^{\beta_{10} x_i + \gamma_{10}} + e^{\beta_{11} x_i + \gamma_{11}} )(1- e^{\beta_{10} x_i + \gamma_{10}}- e^{\beta_{11} x_i + \gamma_{11}}) \\ \cdot (e^{\beta_{01} x_i + \gamma_{01}} + e^{\beta_{11} x_i + \gamma_{11}} )(1- e^{\beta_{01} x_i + \gamma_{01}}- e^{\beta_{11} x_i + \gamma_{11}})}}. \\[10pt]
\end{aligned} \end{equation}$$
The requirement that $\mathbb{Corr}(Y_{1i},Y_{2i} | x_i,s_i=0) = \mathbb{Corr}(Y_{1i},Y_{2i} | x_i,s_i=1)$ means that you equate these two formulae and find the conditions on the parameters that lead to this equation. (Algebraically, it is easier to equate the squared-correlations, which simplifies the expression.) Since you want this equation to hold for all $x_i$ this will impose quite strict requirements on the parameters.
A sufficient condition for equivalence is to have $\gamma_{01} = \gamma_{10} = \gamma_{11} = 0$ so that the variable $s_i$ has no effect at all on the responses. (In other words, it is not really a distinct test in that case.) It is not obvious whether there is any weaker condition that would yield the required correlation equivalence.