unity – Physics2D.IgnoreCollision not work when rb not moving


I want to use Physics2D.IgnoreCollision for ignoring collision between enemy and player, when player have shield.
But I have enemy who some time is static and some time jump only on y axis. When enemy not moving Physics2D.IgnoreCollision not work and physics collision between player and enemy occur even Physics2D.IgnoreCollision is called. When i add some velocity to enemy in update method
Code (CSharp):

rb.velocity = new Vector2(0.1f, rb.velocity.y);

IgnoreCollision work like it should.

Can some one tell me why this happens?

Thanks