Why don’t we change the layer of the GameObject to be ignored by the raycasts? Or is it not a good practice? LayersEnum.IgnoreRaycast equals 2. (But this depends on how you configure the layers within the editor I believe)
void Die()
{
this._animator.SetTrigger("DeathTrigger");
this._hasAnimationPlayed = true;
this.gameObject.layer = (int)LayersEnum.IgnoreRaycast;
}