But how did you create polygon from the video you shared?
You have two ways of creating nodes in godot, one way is just manually, other way is with code.
In your way you can create children of enemy manually: CollisionPolygon for detecting a target, Polygon2D for visualisation (you can fill it with colour, or use texture). Next add in script if enemy moves, then update PoolVector2Array (The polygon's list of vertices) with generated vertices (look to the video I shared how you can generate vertices), then update polygon properties for CollisionPolygon and Polygon2D (you can check class documentation for them)
Updating vertices may not be so easy, you need to create rays, check their collisions and do other stuff.