SetObjectDisplayMode settings do not save in Layout

Hi All,

I have some custom Display Modes that I am using for some architecture diagrams.
In the Layouts I have set up, I am using SetObjectDisplayMode to make some of the contextual buildings a certain Display Mode.
However when I reopen the file, those settings are gone, is there any way to preserve this?

Thanks