Transform has this issue, it doesnt play well with the physics portion of the game.
Double check a few things though: kinematics are not selected,both cubes are perfectly on the some Y plane, either object isnt partially through the floor,
I think you should check with the “moveSpeed”, it is calling in update(). so, even though it collides the moveSpeed is updating every frame. Make moveSpeed = 0; when it collides to blue cube, you can use OnCollisionEnter() for it.