Maimonides writes: "As for Gentiles with whom we are not at war…their death must not be caused, but it is forbidden to save them if they are at the point of death; if, for example, one of them is seen falling into the sea, he should not be rescued, for it is written: ‘neither shalt thou stand against the blood of thy fellow’–but [a Gentile] is not thy fellow" (Mishneh Torah, Laws of Murder 4:11).
https://www.myjewishlearning.com/article/israel-and-anti-gentile-traditions/
Maimonides’ assertion that whereas one who murders a Jew is subject to the death penalty, one who murders a non-Jew is not (Mishneh Torah, Laws of Murder 2:11). According to another leading commentator, indirectly causing the death of a non-Jew is no sin at all (Rabbi Yoel Sirkis, Bayit Hadash, commentary on Bet Yosef, Yoreh Deah 158).
https://www.myjewishlearning.com/article/israel-and-anti-gentile-traditions/