Please read this page for the future and to edit your post:)
It shows you how to insert code nicely on the forums.
As for your question, do you want the enemy to chase the player if it’s beyond the right / left points? (if they the player can be beyond those points). This might require a bit more logic.
I would say make sure you continue to use velocity for physics, rather than move towards.
Just check if you’re chasing, turn to face (use similar code that you have for your right point/ left point), and set ‘facingRight’ appropriately.
Then, include the check for out of bounds, if they can’t chase outside of that.