I assume its a girsa thing because it happens during havdoloh too. I Daven nosach baladi-teimani/ RaMbaM. For Shabboth we say joyim not amim, same with havdoloh. I asks by rov who davens chassidishe nosach Sefard, and he said that the gemoroh in ( I forgot) mentions the text and he said it says amim not goyim. So the kasha in on RaMbaM. I truly believe its a girsa thing. Maybe someone who has the vilna edition of RaMbaM can check what the text is compared to the Mori kafih/frankel Misheh Toroh since the vilna edition usually changed the text according to it's own girsa instead of what RaMbaM wrote.