Generated Grids Keep Flickering

Hello,
I’m creating a puzzle for my game where players encounter a randomly generated grid of varying sizes (e.g., 12x12, 13x14, 9x17) upon entering a room and the player counts the rows and columns to solve a problem. My problem is that Every time they generate, if I get near them they start flickering. I think the problem is because since I am using an actor, the entire grid gets rendered, even the cubes that are far away. Is there any way to just render what the camera sees and not what is behind the first cubes or is it something else that causes the flickering?

This grid is meant to be a 4x4 but every cube flickers, in the image you can see how the left cube has disappeared even inside the camera view.