Animating a collision polygon breaks collision detection

Godot Version

4.4

Question

My Game is a top down 2d game and I have a Door Scene that can face in the 4 directions. It has 4 animations, one for each direction and inside them I change a CollisionPolygon2D to adapt to the new Door shape.

The problem is that I have a bullet rigidbody and an area2d that physically collide but do not emit any signals when colliding with the door. I have contact monitor enabled and they emit signals when colliding when everything else. I have also checked the layers, etc.

I tried not animating the polygon and my bullets started emiting the appropiate signals, so my questions are ¿Why does this happen and how can I animate the polygon and detect collisions by code?