Boolean union creates a hole
There should be a slight difference in dimensions on the Z axis which causes boolean to give an unexpected result. Try to scale the cube.001 very little on Z, it will work then: