Why my collision only work sometimes? 2D platformer

i made a lemmings game. When i turn one of the lemming into a block, sometimes the lemmings can walk though it and other times it cannot. Or maybe it detect collision very slow. Making the rigidbody never sleep helps a little bit… The block is suppose to make the lemmings change directions.

When a lemming changed into a block, i change the gameobject tag. I am using onCollisionEnter2d with box collider 2D. Any clues why this is happening? I am on unity 2019

If u like to see some codes, let me know. I am not at home at the moment.

Try set in Rigidbody component - Collision detection → continuouse. its make it more “soild”. But there can be many issues. Need code or some example .