For me they are in fact snapping to the document grid but I think you're making it difficult for InDesign to figure out which grid you are trying to snap to. Your grid is setup to create a grid line every 32 pixels with 4 subdivisions which means you have a grid line every 8 pixels. I found that two things helped.
- Zoom in when you're moving the boxes. I think it makes it easier to get a more accurate snap.
- Increase the Snap to Zone to 8 px. This combined with zooming in, seems to do the trick.
You still have cases where the object ends up not on the grid. I think you just need to take an extra second or so to make sure that the box is snapping to the desired grid line.