The animated sprite shares materials with the sprite collection.
If you do what you just showed there, that will keep creating duplicate materials every time you call it.
The material for the clip is stored in the sprite collection (an animation clip can contain sprites from many collections).
If you want to switch just one instance, you will have to swap it every frame. LateUpdate is probably best, but make sure to set to
1. Create a dictionary for Material, Material, mapping the source material to one of yours.
2. Every frame, check sharedMaterial, and if there is a matching swap, then swap it to the new material.
Make sure you use the dictionary, otherwise you'll keep creating duplicates.