Let a source S generating a binary (and independent) sequence with the following probabilities: $p$ for the symbol '$0$' and $1−p$ for the symbol '$1$'.
The event B occurs when having a block of $n$ consecutive zeros. The B blocks are not redundant, i.e., they have no common zeros. The B blocks are detected while reading S from the beginning. For example, $n=4$:
\begin{equation} S = 0011\underbrace{0000}_{B_1}100101\underbrace{0000}_{B_2}11\underbrace{0000}_{B_3}\underbrace{0000}_{B_4}0010111\underbrace{0000}_{B_5}00011101\underbrace{0000}_{B_6}0011 \cdots \end{equation}
Assuming we have a certain $n$, $p_B$ is the probability of the event B.
E is the event that corresponds to: a subsequence between two adjacent B blocks (e.g., bits between $B_2$ and $B_3$, or $B_3$ and $B_4$) has an even sum. Note that, the sum zero is even, also the null sum (the two B blocks are consecutive, no bits between them like $B_3$ and $B_4$) is considered as even.
The question is: how to express the probability $p_E$ in terms of $p$, $n$, and $p_B$?
This is an extended comment in that I do a brute force approach that suggests a potential answer.
First the potential answer: The probability of having an even number of 1's in a random sequence of Bernoulli random variables with probability $1-p$ that ends with $n$ zeros for the first time is $1/(2-p^n)$.
Start by enumerating the possibilities for $n=2$. If we look at all of the sequences that can occur up to a length of 10 we get the following sequences that end in 00:
For each sequence the probability will be $p^{\text{number of zeros}}\times(1-p)^{\text{number of ones}}$. Adding up all of probabilities where the sum of the ones is even gets one a polynomial in $p$. The first few coefficients are plugged into OEIS and an expansion of $1/(2-p^2)$ is found.
Doing this again for $n=3$ and $n=4$ finds a pattern.
Running simulations matches well with the relatively simple formula. Using Mathematica: