Note that Box2D (the 2D physics system that Unity uses) does not support deforming physics shapes.
Updating the shape of a PolygonCollider2D causes a destruction and rebuild on the underlying simulation, which they don't recommend, is not performant and likely results in unexpected behavior in many use cases.
However, if you know how to do manual hit and collision detection through your own code, it would work just fine. It just wouldn't be incorporated into Unity's physics.