What happens when the player pushes the box? Are you applying an impulse to the box or setting its position?
I had a moveable object once that was sinking into the floor, but it was a KinematicBody2D. Of course I had to integrate my own pushing, but I was also able to add pulling. Anyway, what was happening was that I was using move_and_slide
to push the object down each frame to apply gravity, and counting on the collision detection to keep it on the floor. But when my player stood on top of it the collision couldn't resolve, so it would slowly sink.
I ended up solving that problem by using move_and_collide
with test_only
set to true. Then I would only apply gravity only if I wasn't colliding with the ground.