Delete a line of unwanted pixels
Combining cubes together so they are touching is not the best flow to make a mesh.
If my suggested fixes didn't help I suggest using Extrude tool when creating a single more complicated mesh.
Select a face

Then use combination E Z 2 to extrude it up by 2 units

Select the side face

And type E Y -5

You will end up with a single object with a single mesh (and no islands) that renders correctly.

When animating simply use this mesh for static shots, and when things need to move just hide it, and use your separated meshes.
EDIT:
Issue seems to be visible only in Eevee rendering engine.
Eevee

Cycles