Yes, it's a bug, I still don't know how to fix it
Have you seen if the collision box is the same size?
Because it's likely that when the sprite is changed, the collision box will be a little bigger.