The problem is that you are instancing the player every frame from scratch. This mean that all you aren't looking at the same player, you are looking at another instance of the player (and also, it is highly inefficient that way :-)
). What you should do is use get_node(...)
to get the node of the player, and then use get_pos
on that.
E.g, If you have the following node structure:
level
player
enemy (script here!)
then you can use
var player_pos = get_node("../player").get_pos()
to get the player node.