That code works fine here. However, I can break it by scaling the bodies. If I set the body's scale to
(1.1, 1.1) they "stick" before moving in a strange direction.
Collisions never work well with scaling. Keep your bodies at
(1, 1) and scale the sprite and/or size the collision shape to match.