KinematicBody2D nodes do not appear to have any exposed size data, so you may have to calculate it manually or calculate the size using the height and width of the texture in the AnimatedSprite.
If you decide to use the height/width of the AnimatedSprite, you should be able to use something like this (assuming the script is attached to the KinematicBody2D):
var anim_sprite = get_node("AnimatedSprite")
var anim_frames = anim_sprite.frames
var anim_frame_texture = anim_frames.get_frame("AnimationNameHere", 0)
get_node(CollisionShape2D").shape.extends = Vector2(anim_frame_texture.get_width() * 0.5, anim_frame_texture.get_height() * 0.5)
It is not very elegant though, and it will always set the size of the collision shape to the size of the texture in the AnimatedSprite.
Another thing you could try is to use a Control-based node to store the size of the entity. You would just need to position it in place over the Sprite, and then you could use its rect_size property for the extends of the collision shape.