The opposite is true. According to the Geneva Convention, refugees must flee to the next safe area in order to be recognized. It is only then that their illegal entry into foreign territory may not be punished. There is no requirement for States to perform search and rescue operations.