Get rid of this fragmented result?

Hello, I’m using subdivision modifier on a cube for later displacement. Now if I generate value from any coordinate, I get this fragmented result on some face.

In the screen is just a simple math with multiplication and snapping.

How do I get rid of it?

It helps if you show all the nodes or share the file. I rarely have a single way out of a problem that applies to everything, and have to try something different.

Here is the file: Infinite Cheated Mirror Cube (for practice purposes, file included)

I also posted some images of the problem there.