[verb (plain)] + わけではない [i-adj] + わけではない [na-adj] + な + わけではない [noun] + な + わけではない
わけではない means "it's not that…", "it doesn't follow that…": it denies a conclusion the listener might draw, not the plain facts. It follows the plain form of a verb or い-adjective, any tense; a な-adjective or noun takes な. わけじゃない is the casual form, わけではありません the polite one.
The second half often gives the real reason, with だけ or が/けど.
ない on its own denies the fact. わけではない denies only the reading of it, so it is softer and leaves room for "partly".
With ぜんぶ全部, みんな, いつも or まいにち毎日, わけではない gives "not all", "not always".
After からといって, it rejects a conclusion drawn too quickly: "just because X doesn't mean Y".