What is best for animation pass through problem?

When battle between ally characters and monster’s 3d modeling,

how deal attack animation if that motion is moving forward?

If do nothing, it break through opponent’s 3d modeling.

If I don’t want that and want to stop at front of opponent’s modeling, then set collider and rigidbody to each of them?

Then there can be many problem like get jammed or move to another space, etc…

What is best practice?

If there is just a lunge in your animation then it depends on what type of game you make. If it’s some kind of strategy or game with “constrained” target based combat system then you can probably do everything programmably.

if (Vector3.Distance(player.transform.position, enemy.transform.position) < attackDistance)
{
    StopMoving();
    Attack(enemy);
}

If it’s 3D game where player fully controls every move and you want to prevent player and enemy from getting too close then you can add gameObject to your player and your enemies with collider + rigidbody and new physics layer which will collide only with itself. It won’t affect your movement and other physics stuff, but will probably give you a desired effect.
Overall it’s all specific to your game’s genre and other parts of your code, how your character move etc.