target_pos is only set once, under
_ready, it's not getting updates with the players position. You need to regularly update the target position with the player's position otherwise the bullet will just go towards the place you set it.
You could try moving the code from
_ready() into your