If you use a Retained topic in MQTT then that will remember it for you. Alternatively you could use Persistent Context in node-red.
[Edit] But I like @hotNipi's idea better.