This is working as intended.
Memory.flags.Flag1 is equivalent to Game.flags.Flag1.memory, not Game.flags.Flag1. You're accessing the flag's memory directly, instead of the object. If you want to save flag's pos in memory, you have to do it yourself, and then, it'll be stringified and to get the actual RoomPos object you'll need to re-create it from the string representation on your own.