You should be able to use either "Bounded Scolling" or just write a custom event to move the red_target back inside the view whenever it exceeds your visible boundaries.
Something like:
if red_target.x > boundary.x : red_target : move to : boundary.x
if red_target.y > boundary.y : red_target : move to : boundary.y