Let $A=(a_{ij})$ be a $n\times n$ complex matrix such that, for every pair $(i,j)\in \{1,2,\dots,n\}\times\{1,2,\dots,n\}$, if the element $a_{ij}$ is replaced with $2-a_{ij}$, then the determinant does not change. Let $B$ be the matrix defined by $(a_{ij}+(-1)^i)$. Compute $\det(B)\cdot (\det(A)-\det(B))$.
Regarding the matrix $A$, I have managed to prove that for every pair $(i,j)\in \{1,2,\dots,n\}\times\{1,2,\dots,n\}$ one has $a_{ij}=1$ or $\delta_{ij}=0$ ($\delta$ denotes the cofactor of an element of the matrix). I see no clear continuation from here.
Following your observation that we have either $a_{ij}=1$ or $\delta_{ij}=0$ for all $i,j$, we note that for any fixed $i$ or $j$, it must hold that $$ \sum_{i=1}^n \delta_{ij} = \sum_{j=1}^n \delta_{ij} = \det(A). $$ As I note in my comment, the matrix determinant lemma allows us to conclude that since $B = A + uv^T$, we have $$ \det(B) = \det(A) + v^T \operatorname{cof}(A)^T u = \det(A) + u^T \operatorname{cof}(A) v \\ = \det(A) + \sum_{i,j = 1}^n (-1)^i \delta_{ij}. $$ However, applying the first identity allows us to rewrite $$ \det(B) = \det(A) + \sum_{i = 1}^n (-1)^i \sum_{j=1}^n\delta_{ij} =\\ \det(A) + \sum_{i = 1}^n (-1)^i \det(A) = \begin{cases} 0 & n \text{ is odd}\\ \det(A) & n \text{ is even}. \end{cases} $$ In either case, we find that $\det(B)(\det(A) - \det(B)) = 0$.