Hello. I have a project I'm making in Unity with c#. I have a couple objects with a Rigidbody2D and BoxCollider2D component each (a player and enemy for this case, but it's also affecting a few other things...). With this logic, I have it set within the OnCollisionEnter2D function that if an object is a certain layer (i.e. in the enemy and player are set for each other on theirs), then Physics2d.IgnoreCollision is called. While this works good for after the initial impact, there's still an initial "bump" that happens, letting the player do stuff like run into enemies and push them off a cliff, smack into a hurtbox before being damaged, etc.
Is there a different function I should be calling in order to stop this initial "bump?"