What is the difference between 〜ないではいられない and 〜ずにはいられない


I was taught that these two phrases are interchangeable and have the same
meaning.

However, I recently wrote a few practice sentences using this grammar point
and they were corrected to use ずには instead of ないでは

The sentences I wrote were:

>   1. 知り合いにそっくりだったので、話しかけ **ないでは** いられなかった。
>   2. まだ子供なので、許さ **ないでは** いられなかった。
>

However, both of these were corrected to:

>   1. 知り合いにそっくりだったので、話しかけ **ずには** いられなかった。
>   2. まだ子供なので、許さ **ずには** いられなかった。
>

I was under the impression that both were acceptable and can't find anything
stating otherwise. Is there something in particular with these sentences that
they can only use ずには？ Or am I completely missing something?




IMO both of these sentences are correct.

>   1. 知り合いにそっくりだったので、話しかけないではいられなかった。
>   2. まだ子供なので、許さないではいられなかった。
>

As a native speaker, the sentences did feel a bit odd to me at first. This is
probably because ずには is much more frequently used than ないでは. Perhaps this is
because it's shorter and easier to pronounce.

My layman advice is to stick to ずには.

