As the Rashba wrote, pat palter already bought remains permitted even after bread of a Jew arrived, but a dish a non-Jew cooked for a sick person on Shabbat is not permitted after he recovers, because the prohibition was only deferred. The Rema was lenient like the Ra'ah, but many Acharonim, and the Mishnah Berurah, were stringent.